Re: pg_basebackup failure after setting default_table_access_method option
Dmitry Dolgov <9erthalion6@gmail.com>
From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>,
vignesh C <vignesh21@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-08T14:03:09Z
Lists: pgsql-hackers
> On Thu, Jun 6, 2019 at 9:06 AM Michael Paquier <michael@paquier.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.
Commits
-
Don't access catalogs to validate GUCs when not connected to a DB.
- 69f32206d7e5 9.4.23 landed
- 483b2d7ae173 9.5.18 landed
- b8607e15e0fa 9.6.14 landed
- 52ad5fc0a6c3 10.9 landed
- c0155601763a 11.4 landed
- fff2a7d7bd09 12.0 landed