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

Commit65b0d1f

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 parent371d40c commit65b0d1f

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
@@ -2625,7 +2625,8 @@ do_autovacuum(void)
26252625

26262626
PushActiveSnapshot(GetTransactionSnapshot());
26272627
perform_work_item(workitem);
2628-
PopActiveSnapshot();
2628+
if (ActiveSnapshotSet())/* transaction could have aborted */
2629+
PopActiveSnapshot();
26292630

26302631
/*
26312632
* Check for config changes before acquiring lock for further jobs.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp