Error using PostgreSQL as database backend with Gramps v5.2.2

Oh, interesting discussion going on here that I missed so far.

@UlrichDemlehner, @Nick-Hall, @StoltHD - a lot of the poor scaling behaviour that shows up when switching to Postgres from SQLite has nothing to do with the way the Gramps database is structured or whether we use Blobs or JSON. It is simply due to the fact that there is lots of code in Gramps where there is a loop over individual database calls to every single object in the Gramps database, which can lead to several thousand individual SELECT statements, such that even a very small network lag (since Postgres uses a server/client architecture while SQLite is just a file) can lead to a delay of minutes.

See for example my comment here: Should the Plugin Registration fail gracefully for missing Prerequisites? - #14 by DavidMStraub

… as well as this Gramps Web API issue, which was making filtering/sorting on Postgres unbearably slow:

@UlrichDemlehner was the problem with the “can’t decode start byte” actually solved?