Re: Increased storage size of jsonb in pg15 - Mailing list pgsql-general

From Sean Flaherty
Subject Re: Increased storage size of jsonb in pg15
Date
Msg-id CAOscTZNUQmNborinfZtYSpUAwLnc7+LeoQzG_2R95Ro8kB=Xog@mail.gmail.com
Whole thread Raw
In response to Re: Increased storage size of jsonb in pg15  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Increased storage size of jsonb in pg15  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
We did a little more digging on our side, which I apologize for not doing beforehand.

We wrote a script to create a simple table with a jsonb column, inserted some json data into the column and then used pg_column_size to test the size of the jsonb data column.    

We ran the script against local docker versions of postgres 14.8 and 15.5 and saw that the data in the jsonb column was the same size.

We then ran the script on AWS RDS Postgres and saw a size difference for the same json data between versions 14.8 and 15.4 (we also saw the larger size on RDS postgres 15.5 and 16.1).

Versionsize (kb)notes
RDS Postgres-14.81587 (the same size we were seeing locally)
RDS Postgres-15.42112

Thank you for your prompt responses and assistance. 

If you are curious, I can share the script we used with you.


Kind regards,
Sean


On Thu, Dec 14, 2023 at 9:47 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thu, Dec 14, 2023 at 7:48 AM Sean Flaherty <sflaherty@grndwork.com> wrote:
We have a process that runs once an hour to read the .dat file in csv format then a node script using the pg package version "8.8.0" to create the json objects and insert the data records as jsonb data.  

None of the upload process changed during the underlying database upgrade.

Basic debugging requires the existence of a self-contained reproducer.  In this case ideally one that only uses psql and some static (already processed) data files, and that is known to produce the observed behaviors on non-RDS PostgreSQL.

David J.

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: vacuumdb did not analyze all tables?=
Next
From: Adrian Klaver
Date:
Subject: Re: Increased storage size of jsonb in pg15