Re: BUG #18259: Assertion in ExtendBufferedRelLocal() fails after no-space-left condition

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Richard Guo <guofenglinux@gmail.com>, tender wang <tndrwang@gmail.com>, Alexander Lakhin <exclusion@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2024-01-04T23:45:13Z
Lists: pgsql-bugs
On Thu, Jan 04, 2024 at 10:56:58AM -0800, Andres Freund wrote:
> But perhaps this could actually serve as a good first case for Michael's
> failure injection patch?  A failure injection to make
> FileFallocate()/FileZero() fail should just be a few lines.
> 
> We generally have pretty much no coverage for out-of-space, partial
> read/write, EINTR of file operations, because that's hard to do with the
> current test infrastructure. So this might be a nice first case.

Indeed.  This one should be fairly simple with a single session, a
couple of SQLs and an ERROR callback.
--
Michael

Commits

  1. Fix corruption of local buffer state during extend of temp relation

  2. bufmgr: Acquire and clean victim buffer separately