Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Neha Sharma <neha.sharma@enterprisedb.com>
Cc: Amul Sul <sulamul@gmail.com>, Amit Langote <amitlangote09@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-03-23T10:09:03Z
Lists: pgsql-hackers
On Tue, Mar 23, 2021 at 04:12:01PM +0900, Michael Paquier wrote:
> It takes some time to initialize a cluster under CLOBBER_CACHE_ALWAYS,
> but the test is quick enough to reproduce.  It would be good to bisect
> the origin point here as a first step.

One bisect later, the winner is:
commit: 3d351d916b20534f973eda760cde17d96545d4c4
author: Tom Lane <tgl@sss.pgh.pa.us>
date: Sun, 30 Aug 2020 12:21:51 -0400
Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.

I am too tired to poke at that today, so I'll try tomorrow.  Tom may
beat me at that though.
--
Michael

Commits

  1. Replace RelationOpenSmgr() with RelationGetSmgr().

  2. Avoid possible crash while finishing up a heap rewrite.

  3. Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.