pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix an intermetant BF failure in 003_logical_slots.
Date: Thu, 11 Jan 2024 03:35:03 +0000
Message-ID: <E1rNlqR-000rLK-7L@gemulon.postgresql.org> (raw)

Fix an intermetant BF failure in 003_logical_slots.

During upgrade, when pg_restore performs CREATE DATABASE, bgwriter or
checkpointer may flush buffers and hold a file handle for pg_largeobject,
so later TRUNCATE pg_largeobject command will fail if OS (such as older
Windows versions) doesn't remove an unlinked file completely till it's
open. The probability of seeing this behavior is higher in this test
because we use wal_level as logical via allows_streaming => 'logical'
which in turn set shared_buffers as 1MB and make it more probable for
bgwriter to hold the file handle.

Diagnosed-by: Alexander Lakhin
Author: Hayato Kuroda, Amit Kapila
Reviewed-by: Alexander Lakhin
Discussion: https://postgr.es/m/TYAPR01MB5866AB7FD922CE30A2565B8BF5A8A@TYAPR01MB5866.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6f97ef05d62a9c4ed5c53e98ac8a44cf3e0a2780

Modified Files
--------------
src/bin/pg_upgrade/t/003_logical_slots.pl | 13 +++++++++++++
1 file changed, 13 insertions(+)



Message-ID: <E1rNlqR-000rLK-7L@gemulon.postgresql.org>
Permalink:  ../E1rNlqR-000rLK-7L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rNlqR-000rLK-7L@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix an intermetant BF failure in 003_logical_slots.
  In-Reply-To: <E1rNlqR-000rLK-7L@gemulon.postgresql.org>

* 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