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

Commit0a3d27b

Browse files
committed
Fix snapshot handling bug in recent BRIN fix
Commita95e3d8 added ActiveSnapshot push+pop when processingwork-items (BRIN autosummarization), but forgot to handle the case ofa transaction failing during the run, which drops the snapshot untimely.Fix by making the pop conditional on an element being actually there.Author: Álvaro Herrera <alvherre@kurilemu.de>Backpatch-through: 13Discussion:https://postgr.es/m/202511041648.nofajnuddmwk@alvherre.pgsql
1 parent1213cb4 commit0a3d27b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/postmaster/autovacuum.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,8 @@ do_autovacuum(void)
25582558

25592559
PushActiveSnapshot(GetTransactionSnapshot());
25602560
perform_work_item(workitem);
2561-
PopActiveSnapshot();
2561+
if (ActiveSnapshotSet())/* transaction could have aborted */
2562+
PopActiveSnapshot();
25622563

25632564
/*
25642565
* Check for config changes before acquiring lock for further jobs.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp