agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Nathan Bossart <nathandbossart@gmail.com>
To: shihao zhong <zhong950419@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers@postgresql.org
Subject: Re: problems with toast.* reloptions
Date: Tue, 24 Jun 2025 13:21:56 -0500
Message-ID: <aFrsxDMgCRs704Ci@nathan> (raw)
In-Reply-To: <aFl598epAdUrrv0y@nathan>
References: <aFRxC1W_kZU9OjJ9@nathan>
<aFTB8bs_u5WyBReK@paquier.xyz>
<aFWyq2canGxR2zHo@nathan>
<CAGRkXqSt50z52SirOOZtFepWYNaOBx1GMN-kZ2ZHky3YPnT6vg@mail.gmail.com>
<aFl598epAdUrrv0y@nathan>
On Mon, Jun 23, 2025 at 10:59:51AM -0500, Nathan Bossart wrote:
> On Sat, Jun 21, 2025 at 11:45:25PM -0400, shihao zhong wrote:
>> 2) When updating a table's relopt, also update the relopt of its
>> associated TOAST table if it's not already set. Similarly, when
>> creating a new TOAST table, it would inherit the parent's relopt.
>>
>> Option 2 seems more reasonable to me, as it avoids requiring customers
>> to manually resolve these options, when they have different settings
>> for the parent and TOAST tables."
>
> I like this one, but since it won't fix existing clusters, it might only be
> workable for v19.
Actually, I think there's a problem with this approach. If we set the
reloption for both the main relation and the TOAST table, then we won't
know what to do for RESET. Take the following examples:
ALTER TABLE test SET (vacuum_truncate = false);
ALTER TABLE test RESET (vacuum_truncate);
ALTER TABLE test SET (vacuum_truncate = false);
ALTER TABLE test SET (toast.vacuum_truncate = false);
ALTER TABLE test RESET (vacuum_truncate);
After executing the commands in the first stanza, you'd expect the
vacuum_truncate reloption to be unset for both the main relation and its
TOAST table. After the second one, you'd expect it to be set for only the
TOAST table. But unless there's some way to know the source of the TOAST
table's reloption, we can't know which behavior is correct at RESET time.
--
nathan
view thread (44+ messages) latest in thread
Message-ID: <aFrsxDMgCRs704Ci@nathan>
Permalink: ../aFrsxDMgCRs704Ci@nathan/
Also on: postgresql.org/message-id/aFrsxDMgCRs704Ci@nathan
reply
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: nathandbossart@gmail.com, zhong950419@gmail.com, michael@paquier.xyz
Subject: Re: problems with toast.* reloptions
In-Reply-To: <aFrsxDMgCRs704Ci@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox