Two PostgreSQL instances returning different output for same query - Mailing list pgsql-admin

From John Scalia
Subject Two PostgreSQL instances returning different output for same query
Date
Msg-id C1D9F597-B620-43B4-8561-49A8725BCBA1@gmail.com
Whole thread Raw
Responses Re: Two PostgreSQL instances returning different output for same query  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Two PostgreSQL instances returning different output for same query  (hubert depesz lubaczewski <depesz@depesz.com>)
Re: Two PostgreSQL instances returning different output for same query  (Ron <ronljohnsonjr@gmail.com>)
Re: Two PostgreSQL instances returning different output for same query  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Two PostgreSQL instances returning different output for same query  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-admin
I’m a bit stumped on this one. For one of my application teams both their DEV instance and UAT instance are running pg
version12.3 in AWS RDS, and I’ve used the same psql version 13.4. 

The query is a simple:  SELECT to_jsonb(geom) FROM addresses LIMIT 1;

On both databases the geom field is of data type geometry from postgis, but the two dbs are running different versions
ofPostgis. DEV is 3.0.2 while UAT is 2.5.2, but I don’t think this is causing the issue. 

Running the query on the DEV instance produces
to_jsonb
———————————-
{“type”: “Point”, “coordinates”: [-106.54569, 31.82908]}

While running it on the UAT instance produces
to_jsonb
—————————————
“0101000020E610009000000000000000“

If I remove the to_jsonb() so the query becomes SELECT geom FROM addresses;  both output the same very long string that
theUAT instance produces for the to_jsonb() output. So UAT does not seem to be processing the to_jsonb. 

I’m thinking that there might be a GUC controlling the output format, but I can’t seem to find any references for one.

Any ideas?
Jay

Sent from my iPad


pgsql-admin by date:

Previous
From: "James Pang (chaolpan)"
Date:
Subject: RE: max_wal_size and wal_keep_size
Next
From: "David G. Johnston"
Date:
Subject: Re: Two PostgreSQL instances returning different output for same query