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>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Increased storage size of jsonb in pg15
Date: Thu, 28 Dec 2023 12:47:10 -0800
Message-ID: <e14f13f4-aef0-4698-9de9-0e27cf548b02@aklaver.com> (raw)
In-Reply-To: <CAOscTZP+rsXRF6b2m+v6oahgcsQ8s7ErZS-wiZdD7HA3boH7sA@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>
	<05dd34df-0fc3-4727-aedb-6232d1ccdd61@aklaver.com>
	<CAOscTZOZqeD++1Mznn0PAQvNvE-etfM6i1Up0LmoaRg-ONX6Kw@mail.gmail.com>
	<23b98884-10e6-4a2c-af8d-a0fad18c9f3c@aklaver.com>
	<CAOscTZP+rsXRF6b2m+v6oahgcsQ8s7ErZS-wiZdD7HA3boH7sA@mail.gmail.com>

On 12/28/23 12:41, Sean Flaherty wrote:
> I'm rather new to the mailing list, are there any additional steps I 
> should take (i.e. posting to pgsql-hackers, etc.)?
> 

For what purpose? You are seeing differences in compression strategies 
between lz4 and pglz. The 'fix' would be to go back to pglz.

> 
> On Thu, Dec 28, 2023 at 11:23 AM Adrian Klaver 
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 12/28/23 09:13, Sean Flaherty wrote:
>      > Follow-up:
>      > Working with AWS, we found that starting in RDS Postgres 15, the
>      > default_toast_compression parameter is set to use lz4 compression
>      > instead of pglz.  This resulted in the increased json storage
>     size we
>      > were seeing.
>      >
>      > I have been able to reproduce the increased storage size on RDS
>     Postgres
>      > and using my local docker instance of postgres 15.5 by changing the
>      > local default_toast_compression value in postgresql.conf.
>      >
>      > I have attached the test script we use to create a table, insert
>     some
>      > test records and a query to test the JSON data size on disk.
> 
>     I can confirm I see the same results using Postgres 16 installed from
>     the PGDG repo on Ubuntu 22.04. That the lz4 data size is greater then
>     the pglz data size.
> 
>      >
>      >
>      > Kind regards,
>      > Sean
>      >
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (18+ messages)  latest in thread

Message-ID: <e14f13f4-aef0-4698-9de9-0e27cf548b02@aklaver.com>
Permalink:  ../e14f13f4-aef0-4698-9de9-0e27cf548b02@aklaver.com/
Also on:    postgresql.org/message-id/e14f13f4-aef0-4698-9de9-0e27cf548b02@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: <e14f13f4-aef0-4698-9de9-0e27cf548b02@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> <CAOscTZOZqeD++1Mznn0PAQvNvE-etfM6i1Up0LmoaRg-ONX6Kw@mail.gmail.com> <23b98884-10e6-4a2c-af8d-a0fad18c9f3c@aklaver.com> <CAOscTZP+rsXRF6b2m+v6oahgcsQ8s7ErZS-wiZdD7HA3boH7sA@mail.gmail.com> <e14f13f4-aef0-4698-9de9-0e27cf548b02@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