From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Refactor some code for ALTER TABLE SET LOGGED/UNLOGGED in tablec |
Date: | 2024-08-29 06:31:50 |
Message-ID: | E1sjYhC-001wCk-0c@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Refactor some code for ALTER TABLE SET LOGGED/UNLOGGED in tablecmds.c
Both sub-commands use the same routine to switch the relpersistence of a
relation, duplicated the same checks, and used a style inconsistent with
access methods and tablespaces.
SET LOGEED/UNLOGGED is refactored to avoid any duplication, setting the
reason why a relation rewrite happens within ATPrepChangePersistence().
This shaves some code.
Discussion: https://postgr.es/m/ZiiyGFTBNkqcMQi_@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9f87da1cffda0e07ff3babcfa84abe9e849ccd95
Modified Files
--------------
src/backend/commands/tablecmds.c | 44 +++++++++++++---------------------------
1 file changed, 14 insertions(+), 30 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2024-08-29 07:01:13 | pgsql: Refactor lock manager initialization to make it a bit less speci |
Previous Message | Peter Eisentraut | 2024-08-29 06:27:58 | pgsql: Fixup for prefetching support on macOS |