Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1
Date
Msg-id 1843940.1668702269@sss.pgh.pa.us
Whole thread Raw
In response to CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1  (Spyridon Dimitrios Agathos <spyridon.dimitrios.agathos@gmail.com>)
Responses Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1
List pgsql-hackers
Spyridon Dimitrios Agathos <spyridon.dimitrios.agathos@gmail.com> writes:
> while testing the developer settings of PSQL (14.5) I came across this
> issue:

> postgres=# CREATE UNLOGGED TABLE stats (
> postgres(#     pg_hash BIGINT NOT NULL,
> postgres(#     category TEXT NOT NULL,
> postgres(#     PRIMARY KEY (pg_hash, category)
> postgres(# );
> server closed the connection unexpectedly

Hmm ... confirmed in the v14 branch, but v15 and HEAD are fine,
evidently as a result of commit f10f0ae42 having replaced this
unprotected use of index->rd_smgr.

I wonder whether we ought to back-patch f10f0ae42.  We could
leave the RelationOpenSmgr macro in existence to avoid unnecessary
breakage of extension code, but stop using it within our own code.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: logical decoding and replication of sequences, take 2
Next
From: Andres Freund
Date:
Subject: Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)