pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: keith.fiske@crunchydata.com
Cc: ejberdecia@yahoo.com
Cc: david.rowley@2ndquadrant.com
Cc: amitlangote09@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15954: Unable to alter partitioned table to set logged
Date: Tue, 23 Apr 2024 14:37:56 +0900
Message-ID: <ZidJNJzvnDVLsgtB@paquier.xyz> (raw)
In-Reply-To: <CAKFQuwZHFOQDcx1tnyjV=kT9ss5dPDk8AKbCPv3ughhUJh5yHg@mail.gmail.com>
References: <1703025078.5205270.1565786782053@mail.yahoo.com>
	<CAODZiv58QvbbHCfh9MbbM6Bfuj7uSNjdCpt8r_H4VpmAOZ_9Qw@mail.gmail.com>
	<20190821134434.GA9383@paquier.xyz>
	<20190822.171439.14634665.horikyota.ntt@gmail.com>
	<CAKFQuwZHFOQDcx1tnyjV=kT9ss5dPDk8AKbCPv3ughhUJh5yHg@mail.gmail.com>

On Mon, Apr 22, 2024 at 12:36:20PM -0700, David G. Johnston wrote:
> There is little upside to preventing the existence of an unlogged
> partitioned table at this point.  I have just submitted a doc patch to deal
> with that side of the equation.

I would not object to that.  However, now that we're five years into
this problem, I'd rather treat that as a new entire feature than
change the existing behavior in the back branches.

Not changing unlogged property of a partitioned table on ALTER TABLE
is of course no good.  However, we also ignore the fact that a
partitioned table is unlogged when we create its partitions, and there
is a point in making partitions inherit this property from the parent.
So, my take would be:
- To switch the relpersistence of a partitioned table on ALTER TABLE,
without touching any of its partitions.
- New partitions should inherit the unlogged property of the parent.
- pg_dump should not need tweaks to be able to cope with that, as
loggedness is part of the CREATE queries.

Compared to the recent experiences around tablespaces and table AMs,
this should be less complicated with code paths for relations without
storage in tablecmds.c.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (20+ messages)  latest in thread

Message-ID: <ZidJNJzvnDVLsgtB@paquier.xyz>
Permalink:  ../ZidJNJzvnDVLsgtB@paquier.xyz/
Also on:    postgresql.org/message-id/ZidJNJzvnDVLsgtB@paquier.xyz

 · 

reply

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-bugs@postgresql.org
  Cc: michael@paquier.xyz, david.g.johnston@gmail.com, horikyota.ntt@gmail.com, keith.fiske@crunchydata.com, ejberdecia@yahoo.com, david.rowley@2ndquadrant.com, amitlangote09@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15954: Unable to alter partitioned table to set logged
  In-Reply-To: <ZidJNJzvnDVLsgtB@paquier.xyz>

* 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