pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Date: Thu, 02 May 2019 11:41:28 -0400
Message-ID: <4870.1556811688@sss.pgh.pa.us> (raw)
In-Reply-To: <20190502153107.o5zadep4ehebzoqy@alap3.anarazel.de>
References: <20190501013638.7u7fwr4zktbyyng5@alap3.anarazel.de>
	<25049.1556727622@sss.pgh.pa.us>
	<20190501170603.hx6r3ztyvi3rlgq6@alap3.anarazel.de>
	<20190501172115.4cvz3rp6np43odut@alap3.anarazel.de>
	<5483.1556737736@sss.pgh.pa.us>
	<16043.1556754084@sss.pgh.pa.us>
	<20190502012520.eyfhhn5ix2ooflys@alap3.anarazel.de>
	<27459.1556762513@sss.pgh.pa.us>
	<20190502021913.axyvyyyw5547swy5@alap3.anarazel.de>
	<25661.1556808540@sss.pgh.pa.us>
	<20190502153107.o5zadep4ehebzoqy@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> ISTM that if we go down this path, we should split (not now, but either
> still in v12, or *early* in v13), the sets of indexes that are intended
> to a) not being used for catalog queries b) may be skipped for index
> insertions. It seems pretty likely that somebody will otherwise soon
> introduce an heap_update() somewhere into the index build process, and
> it'll work just fine in testing due to HOT.

Given the assertions you added in CatalogIndexInsert, I'm not sure
why that's a big hazard?

> I kinda wonder if there's not a third approach hiding somewhere here. We
> could just stop updating pg_class in RelationSetNewRelfilenode() in
> pg_class, when it's an index on pg_class.

Hmm ... are all those indexes mapped?  I guess so.  But don't we need
to worry about resetting relfrozenxid?

			regards, tom lane





view thread (82+ messages)  latest in thread

Message-ID: <4870.1556811688@sss.pgh.pa.us>
Permalink:  ../4870.1556811688@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4870.1556811688@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
  In-Reply-To: <4870.1556811688@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox