Re: BUG #19952: psql \d+ omits nondefault replica identity for partitioned tables

From: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>
To: Pavan <prampalli30(at)gmail(dot)com>
Cc: imchifan(at)mail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19952: psql \d+ omits nondefault replica identity for partitioned tables
Date: 2026-11-30 16:18:28
Message-ID: CAFC+b6rKakBwUdy6ac6mu3vd5u4tkgjbX6pFQwpoVq=A_JH_0w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Pavan,

On Sun, Nov 29, 2026 at 8:32 PM Pavan <prampalli30(at)gmail(dot)com> wrote:

> Hi Srinath,
>
> I reviewed and tested v1 against master (9ebc9a4) with
> --enable-cassert --enable-debug.
>
> - Patch applies cleanly and compiles with no warnings.
> - Full `make check` passes (including `replica_identity` and `psql`).
> - Verified that AT_ReplicaIdentity in tablecmds.c allows only
> ATT_TABLE | ATT_PARTITIONED_TABLE | ATT_MATVIEW, so adding
> RELKIND_PARTITIONED_TABLE in describe.c matches the backend 1-to-1.
> - Manually tested \d+ on partitioned tables with 0 partitions and
> with child partitions (including a sub-partitioned child) across
> all four modes:
> * REPLICA IDENTITY FULL -> displays "Replica Identity: FULL"
> * REPLICA IDENTITY NOTHING -> displays "Replica Identity: NOTHING"
> * REPLICA IDENTITY USING INDEX -> shows the REPLICA IDENTITY marker
> on the index without a duplicate footer
> * REPLICA IDENTITY DEFAULT -> omits the footer as expected
> * Child partitions remain unaffected when altering the parent.
> - Checked psql-ref.sgml; it already describes \d+ as showing
> non-default replica identity generally, so no doc update is needed.
>

Thanks for the review and the thorough testing, including the
child partitions case.

>
> One minor optional suggestion: it might be nice to also include a
> quick check for REPLICA IDENTITY NOTHING (and resetting to DEFAULT)
> in replica_identity.sql, though the code path is straightforward.
> Overall the patch looks clean and good to me.
>

I'd rather keep the test as is. The patch only changes which relkinds
reach the footer code; after that FULL and NOTHING are handled
the same way for every relkind, and NOTHING is already covered for
an ordinary table earlier in replica_identity.sql. DEFAULT is covered
as well: every existing \d+ of a partitioned table in the regression
suite has a default replica identity, and none of those outputs
changed. I'm happy to add if others would also like the same.

If that works for you, could you mark the CF entry as Ready for
Committer?

--
Thanks :)
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Raja Sai pranav 2026-11-30 16:21:13 Re: BUG #19928: pg_upgrade fails on v18 schema with NOT NULL ... NO INHERIT and inheritance
Previous Message jian he 2026-11-30 13:36:21 Re: BUG #19872: JSON_TABLE: an UNUSED PASSING argument's COLLATE leaks into the output columns (wrong results, persi