pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Sean Flaherty <sflaherty@grndwork.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Increased storage size of jsonb in pg15
Date: Fri, 15 Dec 2023 12:56:55 -0800
Message-ID: <05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com> (raw)
In-Reply-To: <CAOscTZNUQmNborinfZtYSpUAwLnc7+LeoQzG_2R95Ro8kB=Xog@mail.gmail.com>
References: <CAOscTZMM5QvuXLUN5yE90w=dM+X=6saJR_1ABiOTtt+Y9G3KnQ@mail.gmail.com>
	<87680387-ed25-41ff-b6de-37e357398df9@aklaver.com>
	<CAOscTZPUcBzWoBqZobvaQ33F1JscsaabjMfi+DSZk07A8HqJPQ@mail.gmail.com>
	<ce378740-2da4-4bf4-a750-9556ae059c53@aklaver.com>
	<CAOscTZNAdqiS4kF1ESW5+6eUMtrzR6WyZXgtd0RUTkbramnk3Q@mail.gmail.com>
	<CAKFQuwb7z+y8ZmmMuTC6Kt+USNRGx2WutHt8QmgAw+MSPXKQcA@mail.gmail.com>
	<CAOscTZNUQmNborinfZtYSpUAwLnc7+LeoQzG_2R95Ro8kB=Xog@mail.gmail.com>

On 12/15/23 12:43, Sean Flaherty wrote:
> 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).

This points at RDS Postgres being the issue. Since that is behind the 
AWS curtain, you will need to contact AWS technical support for 
information on what changed.

> 
>     *Version* 	*size (kb)* 	*notes *
>     RDS Postgres-14.8 	1587 	(the same size we were seeing locally)
>     RDS Postgres-15.4 	2112 	
> 
> 
> Thank you for your prompt responses and assistance.
> 
> If you are curious, I can share the script we used with you.
> 
> 
> Kind regards,
> Sean


-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (18+ messages)  latest in thread

Message-ID: <05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com>
Permalink:  ../05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com/
Also on:    postgresql.org/message-id/05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, sflaherty@grndwork.com, david.g.johnston@gmail.com
  Subject: Re: Increased storage size of jsonb in pg15
  In-Reply-To: <05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com>
  References: <CAOscTZMM5QvuXLUN5yE90w=dM+X=6saJR_1ABiOTtt+Y9G3KnQ@mail.gmail.com> <87680387-ed25-41ff-b6de-37e357398df9@aklaver.com> <CAOscTZPUcBzWoBqZobvaQ33F1JscsaabjMfi+DSZk07A8HqJPQ@mail.gmail.com> <ce378740-2da4-4bf4-a750-9556ae059c53@aklaver.com> <CAOscTZNAdqiS4kF1ESW5+6eUMtrzR6WyZXgtd0RUTkbramnk3Q@mail.gmail.com> <CAKFQuwb7z+y8ZmmMuTC6Kt+USNRGx2WutHt8QmgAw+MSPXKQcA@mail.gmail.com> <CAOscTZNUQmNborinfZtYSpUAwLnc7+LeoQzG_2R95Ro8kB=Xog@mail.gmail.com> <05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox