Re: pg_basebackup failure after setting default_table_access_method option

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup failure after setting default_table_access_method option
Date: 2019-06-08 14:03:09
Message-ID: CA+q6zcVsUZhps_WPaG1hTW7CnMhD+R8kW_gzgHtn_6sjDQxAUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Thu, Jun 6, 2019 at 9:06 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> I was wondering if we actually need at all a catalog lookup at this
> stage, simplifying get_table_am_oid() on the way so as we always
> throw an error (its missing_ok is here to allow a proper error in the
> GUC context).

Just for me to understand, do you suggest to not check
default_table_access_method existence in check_default_table_access_method? If
yes, then

> The table AM lookup happens only when creating a table, so we could just get
> a failure when attempting to create a table with this incorrect value.

is correct, but doesn't it leave the room for some problems in the future with
a wrong assumptions about correctness of default_table_access_method?

> Actually, when updating a value and reloading and/or restarting the
> server, it is possible to easily get in a state where we have an
> invalid table AM parameter stored in the GUC, which is what the
> callback is here to avoid. If you attempt to update the parameter
> with ALTER SYSTEM, then the command complains. So it seems to me that
> the user experience is inconsistent.

Right, as far as I see the there is the same for e.g. default_tablespace due to
IsTransactionState condition. In fact looks like one can see the very same
issue with this option too, so probably it also needs to have MyDatabaseId
check.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2019-06-08 14:09:34 initial random incompatibility
Previous Message Julien Rouhaud 2019-06-08 13:44:04 Re: Quick doc typo fix