Thread: pgsql: Fix an intermetant BF failure in 003_logical_slots.
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(+)