Re: zstd compression for pg_dump

2023-04-06 Thread Tom Lane
Justin Pryzby writes: > On Thu, Apr 06, 2023 at 05:34:30PM +0200, Tomas Vondra wrote: >> I think that's all for PG16 in this patch series. If there's more we want to >> do, it'll have to wait for PG17 - > Yes Shouldn't the CF entry be closed as committed? It's certainly making the cfbot unhap

Re: zstd compression for pg_dump

2023-04-06 Thread Justin Pryzby
On Thu, Apr 06, 2023 at 05:34:30PM +0200, Tomas Vondra wrote: > I looked at the long mode patch again, updated the commit message and > pushed it. I was wondering if long_mode should really be bool - > logically it is, but ZSTD_CCtx_setParameter() expects int. But I think > that's fine. Thanks! >

Re: zstd compression for pg_dump

2023-04-06 Thread Tomas Vondra
On 4/5/23 21:42, Tomas Vondra wrote: > On 4/4/23 05:04, Justin Pryzby wrote: >> On Mon, Apr 03, 2023 at 11:26:09PM +0200, Tomas Vondra wrote: >>> On 4/3/23 21:17, Justin Pryzby wrote: On Sat, Apr 01, 2023 at 10:26:01PM +0200, Tomas Vondra wrote: >> Feel free to mess around with threads

Re: zstd compression for pg_dump

2023-04-05 Thread Tomas Vondra
On 4/4/23 05:04, Justin Pryzby wrote: > On Mon, Apr 03, 2023 at 11:26:09PM +0200, Tomas Vondra wrote: >> On 4/3/23 21:17, Justin Pryzby wrote: >>> On Sat, Apr 01, 2023 at 10:26:01PM +0200, Tomas Vondra wrote: > Feel free to mess around with threads (but I'd much rather see the patch > progr

Re: zstd compression for pg_dump

2023-04-03 Thread Justin Pryzby
On Mon, Apr 03, 2023 at 11:26:09PM +0200, Tomas Vondra wrote: > On 4/3/23 21:17, Justin Pryzby wrote: > > On Sat, Apr 01, 2023 at 10:26:01PM +0200, Tomas Vondra wrote: > >>> Feel free to mess around with threads (but I'd much rather see the patch > >>> progress for zstd:long). > >> > >> OK, underst

Re: zstd compression for pg_dump

2023-04-03 Thread Tomas Vondra
On 4/3/23 21:17, Justin Pryzby wrote: > On Sat, Apr 01, 2023 at 10:26:01PM +0200, Tomas Vondra wrote: >>> Feel free to mess around with threads (but I'd much rather see the patch >>> progress for zstd:long). >> >> OK, understood. The long mode patch is pretty simple. IIUC it does not >> change t

Re: zstd compression for pg_dump

2023-04-03 Thread Justin Pryzby
On Sat, Apr 01, 2023 at 10:26:01PM +0200, Tomas Vondra wrote: > > Feel free to mess around with threads (but I'd much rather see the patch > > progress for zstd:long). > > OK, understood. The long mode patch is pretty simple. IIUC it does not > change the format, i.e. in the worst case we could le

Re: zstd compression for pg_dump

2023-04-01 Thread Tomas Vondra
On 4/1/23 15:36, Justin Pryzby wrote: > > ... > >> If there are no concerns, why disable it outside Windows? I don't have a >> good idea how beneficial the multi-threaded compression is, so I can't >> quite judge the risk/benefits tradeoff. > > Because it's a minor/fringe feature, and it's annoyin

Re: zstd compression for pg_dump

2023-04-01 Thread Justin Pryzby
On Sat, Apr 01, 2023 at 02:49:44PM +0200, Tomas Vondra wrote: > On 4/1/23 02:28, Justin Pryzby wrote: > > On Sat, Apr 01, 2023 at 02:11:12AM +0200, Tomas Vondra wrote: > >> On 4/1/23 01:16, Justin Pryzby wrote: > >>> On Tue, Mar 28, 2023 at 06:23:26PM +0200, Tomas Vondra wrote: > On 3/27/23 19

Re: zstd compression for pg_dump

2023-04-01 Thread Tomas Vondra
On 4/1/23 02:28, Justin Pryzby wrote: > On Sat, Apr 01, 2023 at 02:11:12AM +0200, Tomas Vondra wrote: >> On 4/1/23 01:16, Justin Pryzby wrote: >>> On Tue, Mar 28, 2023 at 06:23:26PM +0200, Tomas Vondra wrote: On 3/27/23 19:28, Justin Pryzby wrote: > On Fri, Mar 17, 2023 at 03:43:31AM +0

Re: zstd compression for pg_dump

2023-03-31 Thread Justin Pryzby
On Sat, Apr 01, 2023 at 02:11:12AM +0200, Tomas Vondra wrote: > On 4/1/23 01:16, Justin Pryzby wrote: > > On Tue, Mar 28, 2023 at 06:23:26PM +0200, Tomas Vondra wrote: > >> On 3/27/23 19:28, Justin Pryzby wrote: > >>> On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > On 3/16/23 0

Re: zstd compression for pg_dump

2023-03-31 Thread Tomas Vondra
On 4/1/23 01:16, Justin Pryzby wrote: > On Tue, Mar 28, 2023 at 06:23:26PM +0200, Tomas Vondra wrote: >> On 3/27/23 19:28, Justin Pryzby wrote: >>> On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: On 3/16/23 05:50, Justin Pryzby wrote: > On Fri, Mar 10, 2023 at 12:48:13PM -080

Re: zstd compression for pg_dump

2023-03-31 Thread Justin Pryzby
On Tue, Mar 28, 2023 at 06:23:26PM +0200, Tomas Vondra wrote: > On 3/27/23 19:28, Justin Pryzby wrote: > > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > >> On 3/16/23 05:50, Justin Pryzby wrote: > >>> On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > On Wed, M

Re: zstd compression for pg_dump

2023-03-29 Thread Jacob Champion
On Wed, Mar 29, 2023 at 6:35 AM Justin Pryzby wrote: > If you have a zstd library with thread support, you could test with > -Z zstd:workers=3. But I think threads aren't enabled in the common > libzstd packages. Jacob figured out how to compile libzstd easily using > "meson wraps" - but I don't

Re: zstd compression for pg_dump

2023-03-29 Thread Justin Pryzby
On Tue, Mar 28, 2023 at 02:03:49PM -0400, Kirk Wolak wrote: > On Tue, Mar 28, 2023 at 12:23 PM Tomas Vondra > wrote: > > On 3/27/23 19:28, Justin Pryzby wrote: > > > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > > >> On 3/16/23 05:50, Justin Pryzby wrote: > > >>> On Fri, Mar 10,

Re: zstd compression for pg_dump

2023-03-28 Thread Jacob Champion
On Wed, Mar 15, 2023 at 9:50 PM Justin Pryzby wrote: > On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > > It looks like pg_dump's meson.build is missing dependencies on zstd > > (meson couldn't find the headers in the subproject without them). > > I saw that this was added for LZ4

Re: zstd compression for pg_dump

2023-03-28 Thread Tomas Vondra
On 3/28/23 20:03, Kirk Wolak wrote: > On Tue, Mar 28, 2023 at 12:23 PM Tomas Vondra > mailto:tomas.von...@enterprisedb.com>> > wrote: > > On 3/27/23 19:28, Justin Pryzby wrote: > > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > >> On 3/16/23 05:50, Justin Pryzby wrote:

Re: zstd compression for pg_dump

2023-03-28 Thread Kirk Wolak
On Tue, Mar 28, 2023 at 12:23 PM Tomas Vondra wrote: > On 3/27/23 19:28, Justin Pryzby wrote: > > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > >> On 3/16/23 05:50, Justin Pryzby wrote: > >>> On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > On Wed, Mar 8, 2

Re: zstd compression for pg_dump

2023-03-28 Thread Tomas Vondra
On 3/27/23 19:28, Justin Pryzby wrote: > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: >> On 3/16/23 05:50, Justin Pryzby wrote: >>> On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion wrote: > I did some

Re: zstd compression for pg_dump

2023-03-27 Thread Justin Pryzby
On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > On 3/16/23 05:50, Justin Pryzby wrote: > > On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > >> On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion > >> wrote: > >>> I did some smoke testing against zstd's GitHub release o

Re: zstd compression for pg_dump

2023-03-27 Thread Tomas Vondra
Hi, On 3/17/23 03:43, Tomas Vondra wrote: > > ... > >>> I'm a little suspicious of the replacement of supports_compression() >>> with parse_compress_specification(). For example: >>> - errmsg = supports_compression(AH->compression_spec); - if (errmsg) + parse_compress_specifi

Re: zstd compression for pg_dump

2023-03-16 Thread Tomas Vondra
On 3/16/23 05:50, Justin Pryzby wrote: > On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: >> On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion >> wrote: >>> I did some smoke testing against zstd's GitHub release on Windows. To >>> build against it, I had to construct an import libr

Re: zstd compression for pg_dump

2023-03-15 Thread Justin Pryzby
On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: > On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion > wrote: > > I did some smoke testing against zstd's GitHub release on Windows. To > > build against it, I had to construct an import library, and put that > > and the DLL into the `li

Re: zstd compression for pg_dump

2023-03-10 Thread Jacob Champion
Hi, This'll need another rebase over the meson ICU changes. On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion wrote: > I did some smoke testing against zstd's GitHub release on Windows. To > build against it, I had to construct an import library, and put that > and the DLL into the `lib` folder exp

Re: zstd compression for pg_dump

2023-03-08 Thread Jacob Champion
On Sat, Mar 4, 2023 at 8:57 AM Justin Pryzby wrote: > pryzbyj=# CREATE TABLE t1 AS SELECT i,array_agg(j) FROM > generate_series(1,444)i,generate_series(1,9)j GROUP BY 1; > $ ./src/bin/pg_dump/pg_dump -d pryzbyj -Fc -Z zstd:long=1 |wc -c > 82023 > $ ./src/bin/pg_dump/pg_dump -d pryzbyj -Fc -Z

Re: zstd compression for pg_dump

2023-03-05 Thread Justin Pryzby
On Sat, Feb 25, 2023 at 07:22:27PM -0600, Justin Pryzby wrote: > On Fri, Feb 24, 2023 at 01:18:40PM -0600, Justin Pryzby wrote: > > This is a draft patch - review is welcome and would help to get this > > ready to be considererd for v16, if desired. > > > > I'm going to add this thread to the old

Re: zstd compression for pg_dump

2023-03-04 Thread Justin Pryzby
On Fri, Mar 03, 2023 at 01:38:05PM -0800, Jacob Champion wrote: > > > With this particular dataset, I don't see much improvement with > > > zstd:long. > > > > Yeah. I this could be because either 1) you already got very good > > comprssion without looking at more data; and/or 2) the neighboring da

Re: zstd compression for pg_dump

2023-03-03 Thread Jacob Champion
On Fri, Mar 3, 2023 at 10:55 AM Justin Pryzby wrote: > Thanks for looking. If your zstd library is compiled with thread > support, could you also try with :workers=N ? I believe this is working > correctly, but I'm going to ask for help verifying that... Unfortunately not (Ubuntu 20.04): p

Re: zstd compression for pg_dump

2023-03-03 Thread Justin Pryzby
On Fri, Mar 03, 2023 at 10:32:53AM -0800, Jacob Champion wrote: > On Sat, Feb 25, 2023 at 5:22 PM Justin Pryzby wrote: > > This resolves cfbot warnings: windows and cppcheck. > > And refactors zstd routines. > > And updates docs. > > And includes some fixes for earlier patches that these patches c

Re: zstd compression for pg_dump

2023-03-03 Thread Jacob Champion
On Sat, Feb 25, 2023 at 5:22 PM Justin Pryzby wrote: > This resolves cfbot warnings: windows and cppcheck. > And refactors zstd routines. > And updates docs. > And includes some fixes for earlier patches that these patches conflicts > with/depends on. This'll need a rebase (cfbot took a while to

Re: zstd compression for pg_dump

2023-02-25 Thread Justin Pryzby
On Fri, Feb 24, 2023 at 01:18:40PM -0600, Justin Pryzby wrote: > This is a draft patch - review is welcome and would help to get this > ready to be considererd for v16, if desired. > > I'm going to add this thread to the old CF entry. > https://commitfest.postgresql.org/31/2888/ This resolves cfb

Re: zstd compression for pg_dump

2023-02-25 Thread Euler Taveira
On Sat, Feb 25, 2023, at 7:31 AM, Tomas Vondra wrote: > On 2/24/23 20:18, Justin Pryzby wrote: > > This is a draft patch - review is welcome and would help to get this > > ready to be considererd for v16, if desired. > > > > I'm going to add this thread to the old CF entry. > > https://commitfest.

Re: zstd compression for pg_dump

2023-02-25 Thread Tomas Vondra
On 2/24/23 20:18, Justin Pryzby wrote: > This is a draft patch - review is welcome and would help to get this > ready to be considererd for v16, if desired. > > I'm going to add this thread to the old CF entry. > https://commitfest.postgresql.org/31/2888/ > Thanks. Sadly cfbot is unhappy - the w

Re: zstd compression for pg_dump

2023-02-24 Thread Justin Pryzby
On Sat, Feb 25, 2023 at 01:44:36PM +0900, Michael Paquier wrote: > On Fri, Feb 24, 2023 at 01:18:40PM -0600, Justin Pryzby wrote: > > This is a draft patch - review is welcome and would help to get this > > ready to be considererd for v16, if desired. > > > > I'm going to add this thread to the ol

Re: zstd compression for pg_dump

2023-02-24 Thread Michael Paquier
On Fri, Feb 24, 2023 at 01:18:40PM -0600, Justin Pryzby wrote: > This is a draft patch - review is welcome and would help to get this > ready to be considererd for v16, if desired. > > I'm going to add this thread to the old CF entry. > https://commitfest.postgresql.org/31/2888/ Patch 0003 adds s

zstd compression for pg_dump

2023-02-24 Thread Justin Pryzby
This is a draft patch - review is welcome and would help to get this ready to be considererd for v16, if desired. I'm going to add this thread to the old CF entry. https://commitfest.postgresql.org/31/2888/ -- Justin >From 2486417b7c3586e150e806a1fbc3b873c2a4a0f9 Mon Sep 17 00:00:00 2001 From: J

Re: zstd compression for pg_dump

2021-04-08 Thread David Steele
On 1/3/21 9:53 PM, Justin Pryzby wrote: I rebased so the "typedef struct compression" patch is first and zstd on top of that (say, in case someone wants to bikeshed about which compression algorithm to support). And made a central struct with all the compression-specific info to further isolate

Re: zstd compression for pg_dump

2021-03-12 Thread Tomas Vondra
On 1/4/21 11:17 AM, Daniil Zakhlystov wrote: > Hi! > >> On Jan 4, 2021, at 11:04 AM, Andrey Borodin wrote: >> >> Daniil, is levels definition compatible with libpq compression patch? >> +typedef struct Compress { >> +CompressionAlgorithmalg; >> +int level; >> +

Re: zstd compression for pg_dump

2021-01-10 Thread Andreas Karlsson
On 1/4/21 3:53 AM, Justin Pryzby wrote: About 89% smaller. Did a quick code review of the patch. I have not yet taken it for a spin yet and there are parts of the code I have not read yet. ## Is there any reason for this diff? -cfp*fp = pg_malloc(sizeof(cfp)); +cfp*f

Re: zstd compression for pg_dump

2021-01-04 Thread Daniil Zakhlystov
Hi! > On Jan 4, 2021, at 11:04 AM, Andrey Borodin wrote: > > Daniil, is levels definition compatible with libpq compression patch? > +typedef struct Compress { > + CompressionAlgorithmalg; > + int level; > + /* Is a nondefault level set ? This is useful since

Re: zstd compression for pg_dump

2021-01-03 Thread Justin Pryzby
On Mon, Jan 04, 2021 at 11:04:57AM +0500, Andrey Borodin wrote: > > 4 янв. 2021 г., в 07:53, Justin Pryzby написал(а): > > Note, there's currently several "compression" patches in CF app. This patch > > seems to be independent of the others, but probably shouldn't be totally > > uncoordinated (li

Re: zstd compression for pg_dump

2021-01-03 Thread Andrey Borodin
> 4 янв. 2021 г., в 07:53, Justin Pryzby написал(а): > > Note, there's currently several "compression" patches in CF app. This patch > seems to be independent of the others, but probably shouldn't be totally > uncoordinated (like adding lz4 in one and ztsd in another might be poor > execution

Re: zstd compression for pg_dump

2021-01-03 Thread Justin Pryzby
On Mon, Dec 21, 2020 at 01:49:24PM -0600, Justin Pryzby wrote: > a big disadvantage of piping through zstd is that it's not identified as a > PGDMP file, and, /usr/bin/file on centos7 fails to even identify zstd by its > magic number.. Other reasons are that pg_dump |zstd >output.zst loses the exi

Re: zstd compression for pg_dump

2020-12-21 Thread Justin Pryzby
On Mon, Dec 21, 2020 at 03:02:40PM -0500, Tom Lane wrote: > Justin Pryzby writes: > > I found that our largest tables are 40% smaller and 20% faster to pipe > > pg_dump -Fc -Z0 |zstd relative to native zlib > > The patch might be a tad smaller if you hadn't included a core file in it. About 89%

Re: zstd compression for pg_dump

2020-12-21 Thread Tom Lane
Justin Pryzby writes: > I found that our largest tables are 40% smaller and 20% faster to pipe > pg_dump -Fc -Z0 |zstd relative to native zlib The patch might be a tad smaller if you hadn't included a core file in it. regards, tom lane