Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5667d3

Browse files
author
Arthur Zakirov
committed
Remove pg_switch_wal()
1 parentd6166f0 commita5667d3

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
staticvoiddo_backup_database(parray*backup_list);
8181

8282
staticvoidpg_start_backup(constchar*label,boolsmooth,pgBackup*backup);
83-
staticvoidpg_switch_wal(PGconn*conn);
8483
staticvoidpg_stop_backup(pgBackup*backup);
8584
staticintcheckpoint_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-
staticvoid
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)

[8]ページ先頭

©2009-2025 Movatter.jp