Allow WaitLatch() to be used without a latch.
Thomas Munro <tmunro@postgresql.org>
Allow WaitLatch() to be used without a latch. Due to flaws in commit 3347c982bab, using WaitLatch() without WL_LATCH_SET could cause an assertion failure or crash. Repair. While here, also add a check that the latch we're switching to belongs to this backend, when changing from one latch to another. Discussion: https://postgr.es/m/CA%2BhUKGK1607VmtrDUHQXrsooU%3Dap4g4R2yaoByWOOA3m8xevUQ%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/storage/ipc/latch.c | modified | +19 −4 |
Discussion
- PostmasterIsAlive() in recovery (non-USE_POST_MASTER_DEATH_SIGNAL builds) 26 messages · 2020-09-17 → 2021-07-12