[Qgis-user] What is postgresql client version and does it have anything to do with different postgresql versions

chris hermansen clhermansen at gmail.com
Thu Feb 4 13:52:03 PST 2021


Richard, Jeroen, list;

On Thu, Feb 4, 2021 at 2:02 AM Richard Duivenvoorde <rdmailings at duif.net>
wrote:

> On 2/4/21 10:16 AM, Groene Bij wrote:
> > Take this example:
> > I would like to see DB Manager as just a shell or GUI which will work
> with
> > every postgresql and postgis version the same way, but in fact it isn't.
> I
> > found DB manager to work differently from qgis3.10 to 3.12 and above.
> > Something changed and as a result, simple select queries can take up 10
> to a
> > 100 times longer in qgis3.12 and up compared to qgis3.10
> > (see also https://github.com/qgis/QGIS/issues/40643)
> >
> > So, I am mostly looking for some kind of reassurance. Things like:
> qgis3.16
> > will work fine with postgresql version a to d and postgis version f to
> l. Or
> > qgis will work fine with any postgresql above version x and postgis above
> > version y. I do realize these are difficult statements to make (how to
> test
> > them?)
>
> Hi Jeroen,
>
> I think you are complicating things :-)
>
> There are postgres/gis SERVER versions
> And postgres/gis/ CLIENT LIBRARY version
>
> In general: IF you have a SERVER version you should try to have the same
> CLIENT (=library) version.
> BUT: only to be able to do the new things introduced in the SERVER version
> OR to have a better client version because they fixed bugs in that
> client(library) version.
> In general: you can probably also connect to a new SERVER version with an
> older CLIENT (unless off course you want to do things that at the time of
> the CLIENT version was just not possible).
>
> My guess: your issue above has anything to do with the pg client libraries
> used, or the combi server/client.
> Chances are bigger that either QGIS is now running other SQL queries OR
> the logic (of loops for example) in QGIS has changed.
>

Just to complement what Richard is saying here, I mostly use PostgreSQL
separately from QGIS, for non-spatial purposes.

On my laptop running Ubuntu 20.10, I have three versions of PostgreSQL
installed: 10.7, 11.7 and 12.5.  When I'm running PostgreSQL locally (ie
same machine client and server, the default configuration is 12.5 client
talking to 10.7 server.  I didn't do that on purpose; it's just ended up
that way, probably due to upgrading my O/S every six months without doing
anything about moving the databases stored there from one version to the
next.

Using my laptop to connect remotely (with the --host option)  to a
customer's server running Ubuntu 18.04, I use the same 12.5 client to talk
to a 10.15 server.

On a different customer's machine, also running Ubuntu 18.04, where I
cannot connect remotely, I use ssh to gain access to the server and run
PostgreSQL locally there, where I have a 10.15 client talking to a 10.15
server.

And so on.  In my mmm 15 or so years of experience with PostgreSQL, it's
somewhat unusual to find oneself connecting clients and servers of the same
version, and I don't recall ever having problems with this situation.

Of course, I'm far from exercising the leading-edge capabilities in
PostgreSQL, so your mileage may vary and all that.

If you are concerned about those new features coming out with each release,
a bit of googling will lead you to useful articles like this one:

https://www.postgresql.org/about/news/postgresql-12-released-1976/

I hope this helps.

-- 
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210204/4551165c/attachment.html>


More information about the Qgis-user mailing list