mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Only try to do a graceful disconnect if we've successfully loaded the
shared library with the disconnect function in it. Fixes segmentation fault reported by Jeff Davis. Fujii Masao
This commit is contained in:
parent
325e9cb3a0
commit
a95d15ff5d
@ -29,7 +29,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/replication/walreceiver.c,v 1.7 2010/03/21 00:17:58 petere Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/replication/walreceiver.c,v 1.8 2010/04/13 08:16:09 mha Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -330,7 +330,8 @@ WalRcvDie(int code, Datum arg)
|
||||
SpinLockRelease(&walrcv->mutex);
|
||||
|
||||
/* Terminate the connection gracefully. */
|
||||
walrcv_disconnect();
|
||||
if (walrcv_disconnect != NULL)
|
||||
walrcv_disconnect();
|
||||
}
|
||||
|
||||
/* SIGHUP: set flag to re-read config file at next convenient time */
|
||||
|
Loading…
Reference in New Issue
Block a user