Re: [HACKERS] Custom compression methods

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Ildus Kurbangaliev <i(dot)kurbangaliev(at)gmail(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [HACKERS] Custom compression methods
Date: 2021-03-20 07:44:20
Message-ID: 20210320074420.GR11765@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

See attached.

One issue is that the pg_dump tests are no longer exercising the COMPRESSION
clause. I don't know how to improve on that, since lz4 may not be available.

..unless we changed attcompression='\0' to mean (for varlena) "the default
compression". Rather than "resolving" to the default compression at the time
the table is created, columns without an explicit compression set would "defer"
to the GUC (of course, that only affects newly-inserted data).

Then, I think pg_dump would generate an COMPRESSION clause for columns with any
compression other than a null byte, and then the tests could "SET COMPRESSION
pglz" and check the output, since it's set to a specific compression, not just
inheriting the default.

I'm not sure if that'd be desirable, but I think that's similar to tablespaces,
where (if I recall) reltablespace=0 means "this database's default tblspc".

--
Justin

Attachment Content-Type Size
0001-Add-docs-for-default_toast_compression.patch text/x-diff 1.8 KB
0002-doc-pg_dump-no-toast-compression.patch text/x-diff 1.1 KB
0003-Compression-method-is-an-char-not-an-OID.patch text/x-diff 1.8 KB
0004-Remove-duplicative-macro.patch text/x-diff 917 bytes
0005-Error-on-invalid-compression-in-CREATE-and-ALTER.patch text/x-diff 2.4 KB
0006-WIP-Change-default_toast_compression-GUC-to-an-enum.patch text/x-diff 5.7 KB
0007-attcompression-is-a-list-of-chars-and-never-null.patch text/x-diff 1.5 KB
0008-WIP-pg_dump-output-default_toast_compression.patch text/x-diff 6.6 KB
0009-WIP-pg_dump-use-ALTER-SET-COMPRESSION-rather-than-co.patch text/x-diff 5.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-03-20 07:52:17 Re: [HACKERS] Custom compression methods
Previous Message Peter Smith 2021-03-20 07:24:20 replication cleanup code incorrect way to use of HTAB HASH_REMOVE ?