Use heap_inplace_update() to unset pg_database.dathasloginevt
Alexander Korotkov <akorotkov@postgresql.org>
Use heap_inplace_update() to unset pg_database.dathasloginevt Doing this instead of regular updates serves two purposes. First, that avoids possible waiting on the row-level lock. Second, that avoids dealing with TOAST. It's known that changes made by heap_inplace_update() may be lost due to concurrent normal updates. However, we are OK with that. The subsequent connections will still have a chance to set "dathasloginevt" to false. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/e2a0248e-5f32-af0c-9832-a90d303c2c61%40gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/event_trigger.c | modified | +32 −4 |
Discussion
- On login trigger: take three 185 messages · 2020-09-03 → 2024-02-06