Re: Is it OK to perform logging while holding a LWLock?
Вложения
В списке pgsql-hackers по дате отправления:
| От | Michael Paquier |
|---|---|
| Тема | Re: Is it OK to perform logging while holding a LWLock? |
| Дата | |
| Msg-id | aad5l1G4pdBYaWBj@paquier.xyz обсуждение исходный текст |
| Ответ на | Re: Is it OK to perform logging while holding a LWLock? (Masahiko Sawada <sawada.mshk@gmail.com>) |
| Ответы |
Re: Is it OK to perform logging while holding a LWLock?
|
| Список | pgsql-hackers |
On Tue, Mar 03, 2026 at 12:48:26PM -0800, Masahiko Sawada wrote: > Also, if we reverse the ereport() and LWLockRelease() in the specific > example in logicalctl.c, it would happen that a concurrent logical > decoding activation writes the log "logical decoding is enabled upon > creating a new logical replication slot" before the deactivation > "logical decoding is disabled because there are no valid logical > replication slots", confusing users since the logical decoding is > active even though the last log saying "logical decoding is disabled". I don't really understand why we need to care about changing these code paths. LWLocks are not bound to requirements like avoiding elog() or Postgres-specific calls while being hold, so what we are doing is basically fine. None of the code paths changed here are relevant performance-wise, as well. Hence, why caring at all with such changes? -- Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера