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

Commita4f0660

Browse files
committed
Fix autovacuum launcher attachment to its DSA
The autovacuum launcher doesn't actually do anything with its DSA otherthan creating it and attaching to it, but it's been observed that afterlongjmp'ing to the standard error handling block (for example aftergetting SIGINT) the autovacuum enters an infinite loop reporting that itcannot attach to its DSA anymore (which is correct, because it's alreadyattached to it.) Fix by only attempting to attach if not alreadyattached.I introduced this bug together with BRIN autosummarization in7526e10.Reported-by: Yugo Nagata.Author: Thomas Munro. I added the comment to go with it.Discussion:https://postgr.es/m/20170621211538.0c9eae73.nagata@sraoss.co.jp
1 parent2a6db5e commita4f0660

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/postmaster/autovacuum.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,8 @@ AutoVacLauncherMain(int argc, char *argv[])
612612

613613
/*
614614
* Set up our DSA so that backends can install work-item requests. It may
615-
* already exist as created by a previous launcher.
615+
* already exist as created by a previous launcher; and we may even be
616+
* already attached to it, if we're here after longjmp'ing above.
616617
*/
617618
if (!AutoVacuumShmem->av_dsa_handle)
618619
{
@@ -626,7 +627,7 @@ AutoVacLauncherMain(int argc, char *argv[])
626627
AutoVacuumShmem->av_workitems=InvalidDsaPointer;
627628
LWLockRelease(AutovacuumLock);
628629
}
629-
else
630+
elseif (AutoVacuumDSA==NULL)
630631
{
631632
AutoVacuumDSA=dsa_attach(AutoVacuumShmem->av_dsa_handle);
632633
dsa_pin_mapping(AutoVacuumDSA);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp