[HACKERS] Race conditions with WAL sender PID lookups

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема [HACKERS] Race conditions with WAL sender PID lookups
Дата
Msg-id CAB7nPqTWYqtzD=LN_oDaf9r-hAjUEPAy0B9yRkhcsLdRN8fzrw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Race conditions with WAL sender PID lookups  (Masahiko Sawada <sawada.mshk@gmail.com>)
Re: [HACKERS] Race conditions with WAL sender PID lookups  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] Race conditions with WAL sender PID lookups  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Hi all,

I had my eyes on the WAL sender code this morning, and I have noticed
that walsender.c is not completely consistent with the PID lookups it
does in walsender.c. In two code paths, the PID value is checked
without holding the WAL sender spin lock (WalSndRqstFileReload and
pg_stat_get_wal_senders), which looks like a very bad idea contrary to
what the new WalSndWaitStopping() does and what InitWalSenderSlot() is
doing for ages.

Any thoughts about the patch attached to make things more consistent?
It seems to me that having some safeguards would be nice for
robustness.

That's an old bug, so I am adding that to the next CF.
Thanks,
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Removal of plaintext password type references
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] [PATCH v2] Progress command to monitor progression oflong running SQL queries