Hello, This patch implements a new GUC parameter "permit_unlogged_tables" which allows admins to disable creation of unlogged tables or altering the existing tables to be unlogged.
This is useful in environments with strict compliance requirements as well as multi-tenant environments where the provider needs to guarantee durability of customer data. The default is "true", which is to say that behavior would remain unchanged. Implementation - Boolean GUC with PGC_SIGHUP context (reloadable without restart) - Check in "DefineRelation()" to block "CREATE UNLOGGED TABLE" commands. - Check in "ATPrepCmd()" to block "ALTER TABLE SET UNLOGGED" commands. - "ALTER TABLE SET LOGGED" commands remain unaffected and should always work. Attached the patch for review. Happy to make adjustments based on feedback. Thanks ! Best, Harinath
v1-0001-Add-permit_unlogged_tables-GUC-to-control-unlogge.patch
Description: Binary data
