| From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> | 
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org | 
| Subject: | pgsql: reorderbuffer: preserve errno while reporting error | 
| Date: | 2016-08-19 17:40:23 | 
| Message-ID: | E1banmJ-0008W2-OL@gemulon.postgresql.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-committers | 
reorderbuffer: preserve errno while reporting error
Clobbering errno during cleanup after an error is an oft-repeated, easy
to make mistake.  Deal with it here as everywhere else, by saving it
aside and restoring after cleanup, before ereport'ing.
In passing, add a missing errcode declaration in another ereport() call
in the same file, which I noticed while skimming the file looking for
similar problems.
Backpatch to 9.4, where this code was introduced.
Branch
------
REL9_6_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/0440f49523fb88a3ecbc1672d8fcee20197c5c40
Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-08-19 18:03:32 | pgsql: Speed up planner's scanning for parallel-query hazards. | 
| Previous Message | Tom Lane | 2016-08-19 17:31:20 | pgsql: Clean up another pre-ANSI-C-ism in regex code: get rid of pcolor |