Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f97ef0

Browse files
author
Amit Kapila
committed
Fix an intermetant BF failure in 003_logical_slots.
During upgrade, when pg_restore performs CREATE DATABASE, bgwriter orcheckpointer may flush buffers and hold a file handle for pg_largeobject,so later TRUNCATE pg_largeobject command will fail if OS (such as olderWindows versions) doesn't remove an unlinked file completely till it'sopen. The probability of seeing this behavior is higher in this testbecause we use wal_level as logical via allows_streaming => 'logical'which in turn set shared_buffers as 1MB and make it more probable forbgwriter to hold the file handle.Diagnosed-by: Alexander LakhinAuthor: Hayato Kuroda, Amit KapilaReviewed-by: Alexander LakhinDiscussion:https://postgr.es/m/TYAPR01MB5866AB7FD922CE30A2565B8BF5A8A@TYAPR01MB5866.jpnprd01.prod.outlook.com
1 parentf7f694b commit6f97ef0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎src/bin/pg_upgrade/t/003_logical_slots.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@
2323
my$newpub = PostgreSQL::Test::Cluster->new('newpub');
2424
$newpub->init(allows_streaming=>'logical');
2525

26+
# During upgrade, when pg_restore performs CREATE DATABASE, bgwriter or
27+
# checkpointer may flush buffers and hold a file handle for the system table.
28+
# So, if later due to some reason we need to re-create the file with the same
29+
# name like a TRUNCATE command on the same table, then the command will fail
30+
# if OS (such as older Windows versions) doesn't remove an unlinked file
31+
# completely till it is open. The probability of seeing this behavior is
32+
# higher in this test because we use wal_level as logical via
33+
# allows_streaming => 'logical' which in turn set shared_buffers as 1MB.
34+
$newpub->append_conf('postgresql.conf',q{
35+
bgwriter_lru_maxpages = 0
36+
checkpoint_timeout = 1h
37+
});
38+
2639
# Setup a common pg_upgrade command to be used by all the test cases
2740
my@pg_upgrade_cmd = (
2841
'pg_upgrade','--no-sync',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp