Re: CREATE UNLOGGED TABLE seq faults when debug_discard_caches=1
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Spyridon Dimitrios Agathos <spyridon.dimitrios.agathos@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-11-17T16:24:29Z
Lists: 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
Commits
-
Replace RelationOpenSmgr() with RelationGetSmgr().
- e21856fd652a 12.14 landed
- d4acf2eb94f3 11.19 landed
- 9a299cf7c21f 13.10 landed
- 32d5a4974c81 14.7 landed
- f10f0ae420ee 15.0 cited