Re: Move pg_attribute.attcompression to earlier in struct for reduced size?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Michael Paquier <michael@paquier.xyz>, Justin Pryzby <pryzby@telsasoft.com>, Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org, Dilip Kumar <dilipbalaut@gmail.com>
Date: 2021-05-26T22:21:43Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Looks good to me.
> I tested the behavior with partitioned tables and it seems OK.

Thanks for reviewing/testing!

> It would be good to have a test case in src/bin/pg_dump/t/002_pg_dump.pl
> for the case

Personally I won't touch 002_pg_dump.pl with a 10-foot pole, but if
somebody else wants to, have at it.

> ... and I find it odd that we don't seem to have anything
> for the "CREATE TABLE foo (LIKE sometab INCLUDING stuff)" form of the
> command ... but neither of those seem the fault of this patch, and they
> both work as [I think] is intended.

Hm, there's this in compression.sql:

-- test LIKE INCLUDING COMPRESSION
CREATE TABLE cmdata2 (LIKE cmdata1 INCLUDING COMPRESSION);
\d+ cmdata2

Or did you mean the case with a partitioned table specifically?

			regards, tom lane



Commits

  1. Remove forced toast recompression in VACUUM FULL/CLUSTER

  2. Rethink definition of pg_attribute.attcompression.

  3. Fix memory leak when de-toasting compressed values in VACUUM FULL/CLUSTER

  4. Re-order pg_attribute columns to eliminate some padding space.

  5. Add more TAP tests for pg_dump with attribute compression