From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, Dilip Kumar <dilipbalaut@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Date: Tue, 25 May 2021 20:33:47 -0500
Message-ID: <20210526013347.GG3676@telsasoft.com> (raw)
In-Reply-To: <626613.1621787110@sss.pgh.pa.us>
References: <20210517204803.iyk5wwvwgtjcmc5w@alap3.anarazel.de>
<2854987.1621285592@sss.pgh.pa.us>
<20210517212857.qyk4fxykfbxhmxof@alap3.anarazel.de>
<YKMXVHCoNGZ61E9q@paquier.xyz>
<YKdT5ZM5OInCsDkM@paquier.xyz>
<3962395.1621609263@sss.pgh.pa.us>
<626613.1621787110@sss.pgh.pa.us>
On Sun, May 23, 2021 at 12:25:10PM -0400, Tom Lane wrote:
> However, the more I looked at that code the less I liked it.
> I think the way that compression selection is handled for indexes,
> ie consult default_toast_compression on-the-fly, is *far* saner
> than what is currently implemented for tables. So I think we
> should redefine attcompression as "ID of a compression method
> to use, or \0 to select the prevailing default. Ignored if
> attstorage does not permit the use of compression".
+1
It reminds me of reltablespace, which is stored as 0 to mean the database's
default tablespace.
Also, values are currently retoasted during vacuum full if their column's
current compression method doesn't match the value's old compression.
But it doesn't rewrite the column if the it used to use the default
compression, and the default was changed. I think your idea would handle that.
--
Justin
PS. I just ran into the memory leak that Andres reported and Michael fixed.
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, andres@anarazel.de, dilipbalaut@gmail.com, robertmhaas@gmail.com
Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
In-Reply-To: <20210526013347.GG3676@telsasoft.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