Thomas Munro wrote: > Hmm. So the problem here is that AutoVacLauncherMain assumes that > there are only two possibilities: (1) there is no handle published in > shmem yet, so we should create a DSA area and publish the handle, and > (2) there is a handle published in shmem so we should attach to it. > But there is a another possiblity: (3) there is a handle published in > shmem, but we are already attached to it (because we've restarted our > main loop after SIGINT). > > The suggestion so far was to check if we're already attached to that > segment (making use of the implementation detail that a DSA handle is > also a DSM segment handle), but don't we know if we're already > attached by checking our AutoVacuumDSA variable?
This seems like a good fix to me. Pushed this way, with an additional comment. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers