repmgrd: fix pidfile handling at shutdown

This commit is contained in:
Ian Barwick
2019-08-19 17:55:18 +09:00
parent 2ec761a979
commit 28f4536372
2 changed files with 15 additions and 3 deletions

View File

@@ -702,7 +702,7 @@ set_repmgrd_pid(PG_FUNCTION_ARGS)
shared_state->repmgrd_pid = repmgrd_pid;
memset(shared_state->repmgrd_pidfile, 0, MAXPGPATH);
if(repmgrd_pidfile != NULL)
if (repmgrd_pidfile != NULL)
{
strncpy(shared_state->repmgrd_pidfile, repmgrd_pidfile, MAXPGPATH);
}