pgsql: Fix an intermetant BF failure in 003_logical_slots.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix an intermetant BF failure in 003_logical_slots.
Date: 2024-01-11 03:35:03
Message-ID: E1rNlqR-000rLK-7L@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Magnus Hagander 2024-01-11 13:44:16 pgsql: Fix omission in partitioning limitation documentation
Previous Message John Naylor 2024-01-11 02:04:52 pgsql: Update documentation of default fdw_tuple_cost