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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Date: 2021-05-27 00:29:50
Message-ID: 1677426.1622075390@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> Yeah, having an extra test for partitioned tables would be a good
> idea.

We do have some coverage already via the pg_upgrade test.

> Could it be possible to have some tests for COMPRESSION DEFAULT? It
> seems to me that this should be documented as a supported keyword for
> CREATE/ALTER TABLE.

Uh, I did do both of those, no? (The docs treat "default" as another
possible value, not a keyword, even though it's a keyword internally.)

> --changing column storage should not impact the compression method
> --but the data should not be compressed
> ALTER TABLE cmdata2 ALTER COLUMN f1 TYPE varchar;
> +ALTER TABLE cmdata2 ALTER COLUMN f1 SET COMPRESSION pglz;
> This comment needs a refresh?

It's correct AFAICS. Maybe it needs a bit of editing for clarity,
but I'm not sure how to make it better. The point is that the
SET STORAGE just below disables compression of new values, no
matter what SET COMPRESSION says.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-05-27 00:31:44 Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Previous Message Michael Paquier 2021-05-27 00:13:30 Re: Move pg_attribute.attcompression to earlier in struct for reduced size?