Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a5667d3

Browse files
author
Arthur Zakirov
committed
Remove pg_switch_wal()
1 parent d6166f0 commit a5667d3

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/backup.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ static void backup_files(void *arg);
8080
static void do_backup_database(parray *backup_list);
8181

8282
static void pg_start_backup(const char *label, bool smooth, pgBackup *backup);
83-
static void pg_switch_wal(PGconn *conn);
8483
static void pg_stop_backup(pgBackup *backup);
8584
static int checkpoint_timeout(void);
8685

@@ -640,15 +639,6 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
640639

641640
PQclear(res);
642641

643-
/*
644-
* Switch to a new WAL segment. It is necessary to get archived WAL
645-
* segment, which includes start LSN of current backup.
646-
*
647-
* Do not switch for standby node and if backup is stream.
648-
*/
649-
if (!stream_wal)
650-
pg_switch_wal(conn);
651-
652642
if (!stream_wal)
653643
/*
654644
* Do not wait start_lsn for stream backup.
@@ -662,28 +652,6 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
662652
wait_replica_wal_lsn(backup->start_lsn, true);
663653
}
664654

665-
/*
666-
* Switch to a new WAL segment. It should be called only for master.
667-
*/
668-
static void
669-
pg_switch_wal(PGconn *conn)
670-
{
671-
PGresult *res;
672-
673-
/* Remove annoying NOTICE messages generated by backend */
674-
res = pgut_execute(conn, "SET client_min_messages = warning;", 0, NULL);
675-
PQclear(res);
676-
677-
if (server_version >= 100000)
678-
res = pgut_execute(conn, "SELECT * FROM pg_switch_wal()", 0,
679-
NULL);
680-
else
681-
res = pgut_execute(conn, "SELECT * FROM pg_switch_xlog()", 0,
682-
NULL);
683-
684-
PQclear(res);
685-
}
686-
687655
/*
688656
* Check if the instance supports ptrack
689657
* TODO Maybe we should rather check ptrack_version()?

0 commit comments

Comments
 (0)