errno clobbering in reorderbuffer - Mailing list pgsql-hackers

From Alvaro Herrera
Subject errno clobbering in reorderbuffer
Date
Msg-id 20160818220602.GA981393@alvherre.pgsql
Whole thread Raw
Responses Re: errno clobbering in reorderbuffer  (Andres Freund <andres@anarazel.de>)
Re: errno clobbering in reorderbuffer  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: errno clobbering in reorderbuffer  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
While researching a customer issue with BDR I noticed that one ereport()
call happens after clobbering errno, leading to the wrong strerror being
reported.  This patch fixes it by saving before calling
CloseTransientFile and restoring afterwards.

I also threw in a missing errcode I noticed while looking for similar
problems in the same file.

This is to backpatch to 9.4.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_basebackup wish list