errno clobbering in reorderbuffer

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: errno clobbering in reorderbuffer
Date: 2016-08-18 22:06:02
Message-ID: 20160818220602.GA981393@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
reorderbuffer-errno.patch text/x-diff 950 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-08-18 22:06:31 Re: pg_basebackup wish list
Previous Message Claudio Freire 2016-08-18 22:04:10 Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location