Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb
Amul Sul <sulamul@gmail.com>
From: Amul Sul <sulamul@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Michael Paquier <michael@paquier.xyz>, Noah Misch <noah@leadboat.com>, Neha Sharma <neha.sharma@enterprisedb.com>,
Amit Langote <amitlangote09@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-07-13T03:48:05Z
Lists: pgsql-hackers
Thanks a lot Tom. On Tue, Jul 13, 2021 at 2:37 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Amul Sul <sulamul@gmail.com> writes: > > [ v5_Add-RelationGetSmgr-inline-function.patch ] > > Pushed with minor cosmetic adjustments. > > RelationCopyStorage() kind of gives me the willies. > It's not really an smgr-level function, but we call it > everywhere with smgr pointers that belong to relcache entries: > > /* copy main fork */ > - RelationCopyStorage(rel->rd_smgr, dstrel, MAIN_FORKNUM, > + RelationCopyStorage(RelationGetSmgr(rel), dstrel, MAIN_FORKNUM, > rel->rd_rel->relpersistence); > > So that would fail hard if a relcache flush could occur inside > that function. It seems impossible today, so I settled for > just annotating the function to that effect. But it won't > surprise me a bit if somebody breaks it in future due to not > having read/understood the comment. > > 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 landed
-
Avoid possible crash while finishing up a heap rewrite.
- d4791ac35cb1 13.3 landed
- 9d523119fd38 14.0 landed
-
Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.
- 3d351d916b20 14.0 cited