Skip to content

Commit 8f1a459

Browse files
committed
Issue #112: Set datestyle before pg_stop_backup()
1 parent 9c4cdef commit 8f1a459

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backup.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ do_backup_instance(PGconn *backup_conn, PGNodeInfo *nodeInfo)
612612
* check remote PostgreSQL instance.
613613
* Also checking system ID in this case serves no purpose, because
614614
* all work is done by server.
615-
*
615+
*
616616
* Returns established connection
617617
*/
618618
PGconn *
@@ -1609,6 +1609,10 @@ pg_stop_backup(pgBackup *backup, PGconn *pg_startbackup_conn,
16091609
0, NULL);
16101610
PQclear(res);
16111611

1612+
/* Make proper timestamp format for parse_time() */
1613+
res = pgut_execute(conn, "SET datestyle = 'ISO, DMY';", 0, NULL);
1614+
PQclear(res);
1615+
16121616
/* Create restore point
16131617
* Only if backup is from master.
16141618
* For PG 9.5 create restore point only if pguser is superuser.

0 commit comments

Comments
 (0)