Re: Why are we PageInit'ing buffers in RelationAddExtraBlocks()?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Why are we PageInit'ing buffers in RelationAddExtraBlocks()?
Date: 2019-01-28 22:10:55
Message-ID: 20190128221055.nddkrusu3u5263qo@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

So, I'd pushed the latest version. And longfin came back with an
interesting error:

ERROR: page 135 of relation "pg_class" should be empty but is not

The only way I can currently imagine this happening is that there's a
concurrent vacuum that discovers the page is empty, enters it into the
FSM (which now isn't happening under an extension lock anymore), and
then a separate backend starts to actually use that buffer. That seems
tight but possible. Seems we need to re-add the
LockRelationForExtension/UnlockRelationForExtension() logic :(

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-01-28 22:22:59 Re: Why are we PageInit'ing buffers in RelationAddExtraBlocks()?
Previous Message Tom Lane 2019-01-28 22:05:32 Re: Early WIP/PoC for inlining CTEs