From 0dc602ca41fee1ca8bd85056add8bcb8f44bf510 Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Sun, 14 Feb 2010 11:24:45 +0100
Subject: [PATCH] Dont try to save the errno in RecoveryConflictInterrupt to avoid confusion.

In the current state the errno saving in there is confusing as there
are several returns ignoring to set it. I think its currently harmless
as there should be no changes to errno at those places - beside that
the only caller (procsignal_sigusr1_handler) already saves it.
---
 src/backend/tcop/postgres.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 8c0c8b9..3505fc4 100644
*** a/src/backend/tcop/postgres.c
--- b/src/backend/tcop/postgres.c
*************** SigHupHandler(SIGNAL_ARGS)
*** 2753,2763 ****
  void
  RecoveryConflictInterrupt(ProcSignalReason reason)
  {
- 	int                     save_errno = errno;
- 
  	/*
! 	* Don't joggle the elbow of proc_exit
! 	*/
  	if (!proc_exit_inprogress)
  	{
  		RecoveryConflictReason = reason;
--- 2753,2761 ----
  void
  RecoveryConflictInterrupt(ProcSignalReason reason)
  {
  	/*
! 	 * Don't joggle the elbow of proc_exit
! 	 */
  	if (!proc_exit_inprogress)
  	{
  		RecoveryConflictReason = reason;
*************** RecoveryConflictInterrupt(ProcSignalReas
*** 2856,2863 ****
  			ProcessInterrupts();
  		}
  	}
- 
- 	errno = save_errno;
  }
  
  /*
--- 2854,2859 ----
-- 
1.6.5.12.gd65df24

