Re: [PATCH][PROPOSAL] Refuse setting toast.* reloptions when TOAST table does not exist

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Nikolay Shaplov <dhyan(at)nataraj(dot)su>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: [PATCH][PROPOSAL] Refuse setting toast.* reloptions when TOAST table does not exist
Date: 2018-01-26 02:50:25
Message-ID: 65158ea5-46d0-c5a1-1c23-a45ee21ffb85@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/25/18 09:40, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> On 1/23/18 13:39, Robert Haas wrote:
>>> I don't understand. AAUI, it is currently the case that if you set
>>> the options before the TOAST table exists, they are lost.
>
>> Well, that's also weird.
>
> Well, maybe the right answer is to address that. It's clear to me
> why that would happen if we store these things as reloptions on the
> toast table, but can't they be stored on the parent table?

I don't think there is a case where this can currently be a problem with
the current options set, but here is what I was thinking about: Imagine
there were a setting toast.fillfactor or something like that that
affects the storage layout of the TOAST table. If you ran

ALTER TABLE mytbl ADD COLUMN foo text DEFAULT somelongvalue();

then you would conceivably want to set TOAST-related reloptions before
the TOAST table is created and have them apply as the TOAST table is
being first populated.

Again, currently not a problem, I think.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-01-26 02:54:03 Re: [HACKERS] GnuTLS support
Previous Message Peter Eisentraut 2018-01-26 02:44:53 Re: [PATCH] Logical decoding of TRUNCATE