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

Started by Shinya Kato8 days ago4 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

won't retrysuccessCI history

This thread has been committed, so CI has stopped here. Anything below is the last result it produced.

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253427
psql -h localhost -U postgres

Built from patchset v1 (message #1), August 16, 2026 at 05:30 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t253427_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t253427_1 && git checkout t253427_1

Patchset v1 (message #1) is on t253427_1

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