Refactor some code for ALTER TABLE SET LOGGED/UNLOGGED in tablecmds.c
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +14 −30 |
Discussion
- Partitioned tables and [un]loggedness 37 messages · 2024-04-24 → 2025-06-11