psql \d+ shows "Replica Identity: ???" for REPLICA IDENTITY NOTHING

Started by Shinya Kato3 months ago4 messageshackers
Jump to latest
#1Shinya Kato
shinya11.kato@gmail.com

Hi hackers,

I found that \d+ shows "Replica Identity: ???" for a table with
REPLICA IDENTITY NOTHING:

```
CREATE TABLE t (a int);
ALTER TABLE t REPLICA IDENTITY NOTHING;
\d+ t
Table "public.t"
Column | Type | Collation | Nullable | Default | Storage |
Compression | Stats target | Description
--------+---------+-----------+----------+---------+---------+-------------+--------------+-------------
a | integer | | | | plain |
| |
Replica Identity: ???
Access method: heap
```

Commit 18954ce7f69 replaced the hard-coded relreplident characters in
describe.c with REPLICA_IDENTITY_* macros, but wrote
REPLICA_IDENTITY_DEFAULT where REPLICA_IDENTITY_NOTHING was intended,
so the NOTHING case falls through to "???". This is a regression in
v18.

The attached patch fixes the comparison and adds regression test
coverage, which only existed for FULL. I think this should be
back-patched to v18.

Thoughts?

--
Shinya Kato
NTT OSS Center

Attachments:

t253427_1
v1-0001-psql-Fix-d-display-of-REPLICA-IDENTITY-NOTHING.patchapplication/octet-stream; name=v1-0001-psql-Fix-d-display-of-REPLICA-IDENTITY-NOTHING.patchDownload+26-2
#2Michael Paquier
michael@paquier.xyz
In reply to: Shinya Kato (#1)
Re: psql \d+ shows "Replica Identity: ???" for REPLICA IDENTITY NOTHING

On Sun, Aug 16, 2026 at 02:18:44PM +0900, Shinya Kato wrote:

Commit 18954ce7f69 replaced the hard-coded relreplident characters in
describe.c with REPLICA_IDENTITY_* macros, but wrote
REPLICA_IDENTITY_DEFAULT where REPLICA_IDENTITY_NOTHING was intended,
so the NOTHING case falls through to "???". This is a regression in
v18.

The attached patch fixes the comparison and adds regression test
coverage, which only existed for FULL. I think this should be
back-patched to v18.

Thoughts?

にゃ。 Sorry about that. Will double-check and fix..
--
Michael

#3Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#2)
Re: psql \d+ shows "Replica Identity: ???" for REPLICA IDENTITY NOTHING

On Sun, Aug 16, 2026 at 03:57:25PM +0900, Michael Paquier wrote:

にゃ。 Sorry about that. Will double-check and fix..

Done as baa7b142aace.
--
Michael

#4Shinya Kato
shinya11.kato@gmail.com
In reply to: Michael Paquier (#3)
Re: psql \d+ shows "Replica Identity: ???" for REPLICA IDENTITY NOTHING

On Mon, Aug 17, 2026, 09:22 Michael Paquier <michael@paquier.xyz> wrote:

On Sun, Aug 16, 2026 at 03:57:25PM +0900, Michael Paquier wrote:

にゃ。 Sorry about that. Will double-check and fix..

Done as baa7b142aace.

Thanks!

Show quoted text