From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove support for unlogged on partitioned tables
Date: Thu, 03 Oct 2024 01:55:55 +0000
Message-ID: <E1swB4M-001w5v-M7@gemulon.postgresql.org> (raw)
Remove support for unlogged on partitioned tables
The following commands were allowed on partitioned tables, with
different effects:
1) ALTER TABLE SET [UN]LOGGED did not issue an error, and did not update
pg_class.relpersistence.
2) CREATE UNLOGGED TABLE was working with pg_class.relpersistence marked
as initially defined, but partitions did not inherit the UNLOGGED
property, which was confusing.
This commit causes the commands mentioned above to fail for partitioned
tables, instead.
pg_dump is tweaked so as partitioned tables marked as UNLOGGED ignore
the option when dumped from older server versions. pgbench needs a
tweak for --unlogged and --partitions=N to ignore the UNLOGGED option on
the partitioned tables created, its partitions still being unlogged.
Author: Michael Paquier
Reviewed-by: Nathan Bossart
Discussion: https://postgr.es/m/ZiiyGFTBNkqcMQi_@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e2bab2d792044b55dd092bf1c2be0d570ccb9401
Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml | 4 ++++
doc/src/sgml/ref/create_table.sgml | 4 ++++
src/backend/commands/tablecmds.c | 9 +++++++--
src/bin/pg_dump/pg_dump.c | 7 ++++++-
src/bin/pgbench/pgbench.c | 2 +-
src/test/regress/expected/create_table.out | 10 ++++++++++
src/test/regress/sql/create_table.sql | 6 ++++++
7 files changed, 38 insertions(+), 4 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Remove support for unlogged on partitioned tables
In-Reply-To: <E1swB4M-001w5v-M7@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox