@@ -80,7 +80,6 @@ static void backup_files(void *arg);
80
80
static void do_backup_database (parray * backup_list );
81
81
82
82
static void pg_start_backup (const char * label , bool smooth , pgBackup * backup );
83
- static void pg_switch_wal (PGconn * conn );
84
83
static void pg_stop_backup (pgBackup * backup );
85
84
static int checkpoint_timeout (void );
86
85
@@ -640,15 +639,6 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
640
639
641
640
PQclear (res );
642
641
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
-
652
642
if (!stream_wal )
653
643
/*
654
644
* Do not wait start_lsn for stream backup.
@@ -662,28 +652,6 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup)
662
652
wait_replica_wal_lsn (backup -> start_lsn , true);
663
653
}
664
654
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
-
687
655
/*
688
656
* Check if the instance supports ptrack
689
657
* TODO Maybe we should rather check ptrack_version()?
0 commit comments