Re: Partitioned tables and [un]loggedness

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-09-03T07:59:18Z
Lists: pgsql-hackers

Attachments

On Mon, Sep 02, 2024 at 08:35:15PM -0500, Nathan Bossart wrote:
> On Tue, Sep 03, 2024 at 09:22:58AM +0900, Michael Paquier wrote:
>> Okay.  This is going to be disruptive if we do nothing about pg_dump,
>> unfortunately.  How about tweaking dumpTableSchema() so as we'd never
>> issue UNLOGGED for a partitioned table?  We could filter that out as
>> there is tbinfo->relkind.
> 
> That's roughly what I had in mind.

An idea is attached.  The pgbench bit was unexpected.
--
Michael

Commits

  1. psql: Remove PARTITION BY clause in tab completion for unlogged tables

  2. Remove support for unlogged on partitioned tables

  3. Remove ATT_TABLE for ALTER TABLE ... ATTACH/DETACH

  4. Introduce ATT_PARTITIONED_TABLE in tablecmds.c

  5. Refactor some code for ALTER TABLE SET LOGGED/UNLOGGED in tablecmds.c

  6. Remove tab completion for CREATE UNLOGGED MATERIALIZED VIEW.