Simplify some ERROR paths clearing wait events and transient files
Michael Paquier <michael@paquier.xyz>
Simplify some ERROR paths clearing wait events and transient files Transient files and wait events get normally cleaned up when seeing an exception (be it in the context of a transaction for a backend or another process like the checkpointer), hence there is little point in complicating error code paths to do this work. This shaves a bit of code, and removes some extra handling with errno which needed to be preserved during the cleanup steps done. Reported-by: Masahiko Sawada Author: Michael Paquier Reviewed-by: Tom Lane, Masahiko Sawada Discussion: https://postgr.es/m/CAD21AoDhHYVq5KkXfkaHhmjA-zJYj-e4teiRAJefvXuKJz1tKQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/twophase.c | modified | +4 −18 |
| src/backend/replication/logical/origin.c | modified | +6 −15 |
| src/backend/replication/slot.c | modified | +0 −14 |
| src/backend/storage/file/copydir.c | modified | +0 −1 |
Discussion
- Calling pgstat_report_wait_end() before ereport(ERROR) 9 messages · 2019-04-12 → 2019-04-17