Skip to content

Commit 822111e

Browse files
committed
[PBCKP-232] remove 9.5-9.6 support, part 1
1 parent 512488f commit 822111e

File tree

13 files changed

+100
-383
lines changed

13 files changed

+100
-383
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ env:
5252
jobs:
5353
allow_failures:
5454
- if: env(PG_BRANCH) = master
55+
- if: env(PG_BRANCH) = REL9_6_STABLE
5556
- if: env(PG_BRANCH) = REL9_5_STABLE
5657
# - if: env(MODE) IN (archive, backup, delta, locking, merge, replica, retention, restore)
5758

README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
`pg_probackup` is a utility to manage backup and recovery of PostgreSQL database clusters. It is designed to perform periodic backups of the PostgreSQL instance that enable you to restore the server in case of a failure.
77

88
The utility is compatible with:
9-
* PostgreSQL 9.6, 10, 11, 12, 13, 14;
9+
* PostgreSQL 10, 11, 12, 13, 14;
1010

1111
As compared to other backup solutions, `pg_probackup` offers the following benefits that can help you implement different backup strategies and deal with large amounts of data:
1212
* Incremental backup: page-level incremental backup allows you to save disk space, speed up backup and restore. With three different incremental modes, you can plan the backup strategy in accordance with your data flow.
@@ -74,109 +74,109 @@ Installers are available in release **assets**. [Latests](https://github.com/pos
7474
#DEB Ubuntu|Debian Packages
7575
sudo sh -c 'echo "deb [arch=amd64] https://repo.postgrespro.ru/pg_probackup/deb/ $(lsb_release -cs) main-$(lsb_release -cs)" > /etc/apt/sources.list.d/pg_probackup.list'
7676
sudo wget -O - https://repo.postgrespro.ru/pg_probackup/keys/GPG-KEY-PG_PROBACKUP | sudo apt-key add - && sudo apt-get update
77-
sudo apt-get install pg-probackup-{14,13,12,11,10,9.6}
78-
sudo apt-get install pg-probackup-{14,13,12,11,10,9.6}-dbg
77+
sudo apt-get install pg-probackup-{14,13,12,11,10}
78+
sudo apt-get install pg-probackup-{14,13,12,11,10}-dbg
7979

8080
#DEB-SRC Packages
8181
sudo sh -c 'echo "deb-src [arch=amd64] https://repo.postgrespro.ru/pg_probackup/deb/ $(lsb_release -cs) main-$(lsb_release -cs)" >>\
8282
/etc/apt/sources.list.d/pg_probackup.list' && sudo apt-get update
83-
sudo apt-get source pg-probackup-{14,13,12,11,10,9.6}
83+
sudo apt-get source pg-probackup-{14,13,12,11,10}
8484

8585
#DEB Astra Linix Orel
8686
sudo sh -c 'echo "deb [arch=amd64] https://repo.postgrespro.ru/pg_probackup/deb/ stretch main-stretch" > /etc/apt/sources.list.d/pg_probackup.list'
8787
sudo wget -O - https://repo.postgrespro.ru/pg_probackup/keys/GPG-KEY-PG_PROBACKUP | sudo apt-key add - && sudo apt-get update
88-
sudo apt-get install pg-probackup-{14,13,12,11,10,9.6}{-dbg,}
88+
sudo apt-get install pg-probackup-{14,13,12,11,10}{-dbg,}
8989

9090
#RPM Centos Packages
9191
rpm -ivh https://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-centos.noarch.rpm
92-
yum install pg_probackup-{14,13,12,11,10,9.6}
93-
yum install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
92+
yum install pg_probackup-{14,13,12,11,10}
93+
yum install pg_probackup-{14,13,12,11,10}-debuginfo
9494

9595
#RPM RHEL Packages
9696
rpm -ivh https://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-rhel.noarch.rpm
97-
yum install pg_probackup-{14,13,12,11,10,9.6}
98-
yum install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
97+
yum install pg_probackup-{14,13,12,11,10}
98+
yum install pg_probackup-{14,13,12,11,10}-debuginfo
9999

100100
#RPM Oracle Linux Packages
101101
rpm -ivh https://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-oraclelinux.noarch.rpm
102-
yum install pg_probackup-{14,13,12,11,10,9.6}
103-
yum install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
102+
yum install pg_probackup-{14,13,12,11,10}
103+
yum install pg_probackup-{14,13,12,11,10}-debuginfo
104104

105105
#SRPM Centos|RHEL|OracleLinux Packages
106-
yumdownloader --source pg_probackup-{14,13,12,11,10,9.6}
106+
yumdownloader --source pg_probackup-{14,13,12,11,10}
107107

108108
#RPM SUSE|SLES Packages
109109
zypper install --allow-unsigned-rpm -y https://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-suse.noarch.rpm
110-
zypper --gpg-auto-import-keys install -y pg_probackup-{14,13,12,11,10,9.6}
111-
zypper install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
110+
zypper --gpg-auto-import-keys install -y pg_probackup-{14,13,12,11,10}
111+
zypper install pg_probackup-{14,13,12,11,10}-debuginfo
112112

113113
#SRPM SUSE|SLES Packages
114-
zypper si pg_probackup-{14,13,12,11,10,9.6}
114+
zypper si pg_probackup-{14,13,12,11,10}
115115

116116
#RPM ALT Linux 7
117117
sudo sh -c 'echo "rpm https://repo.postgrespro.ru/pg_probackup/rpm/latest/altlinux-p7 x86_64 vanilla" > /etc/apt/sources.list.d/pg_probackup.list'
118118
sudo apt-get update
119-
sudo apt-get install pg_probackup-{14,13,12,11,10,9.6}
120-
sudo apt-get install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
119+
sudo apt-get install pg_probackup-{14,13,12,11,10}
120+
sudo apt-get install pg_probackup-{14,13,12,11,10}-debuginfo
121121

122122
#RPM ALT Linux 8
123123
sudo sh -c 'echo "rpm https://repo.postgrespro.ru/pg_probackup/rpm/latest/altlinux-p8 x86_64 vanilla" > /etc/apt/sources.list.d/pg_probackup.list'
124124
sudo apt-get update
125-
sudo apt-get install pg_probackup-{14,13,12,11,10,9.6}
126-
sudo apt-get install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
125+
sudo apt-get install pg_probackup-{14,13,12,11,10}
126+
sudo apt-get install pg_probackup-{14,13,12,11,10}-debuginfo
127127

128128
#RPM ALT Linux 9
129129
sudo sh -c 'echo "rpm https://repo.postgrespro.ru/pg_probackup/rpm/latest/altlinux-p9 x86_64 vanilla" > /etc/apt/sources.list.d/pg_probackup.list'
130130
sudo apt-get update
131-
sudo apt-get install pg_probackup-{14,13,12,11,10,9.6}
132-
sudo apt-get install pg_probackup-{14,13,12,11,10,9.6}-debuginfo
131+
sudo apt-get install pg_probackup-{14,13,12,11,10}
132+
sudo apt-get install pg_probackup-{14,13,12,11,10}-debuginfo
133133
```
134134

135135
#### pg_probackup for PostgresPro Standard and Enterprise
136136
```shell
137137
#DEB Ubuntu|Debian Packages
138138
sudo sh -c 'echo "deb [arch=amd64] https://repo.postgrespro.ru/pg_probackup-forks/deb/ $(lsb_release -cs) main-$(lsb_release -cs)" > /etc/apt/sources.list.d/pg_probackup-forks.list'
139139
sudo wget -O - https://repo.postgrespro.ru/pg_probackup-forks/keys/GPG-KEY-PG_PROBACKUP | sudo apt-key add - && sudo apt-get update
140-
sudo apt-get install pg-probackup-{std,ent}-{13,12,11,10,9.6}
141-
sudo apt-get install pg-probackup-{std,ent}-{13,12,11,10,9.6}-dbg
140+
sudo apt-get install pg-probackup-{std,ent}-{13,12,11,10}
141+
sudo apt-get install pg-probackup-{std,ent}-{13,12,11,10}-dbg
142142

143143
#DEB Astra Linix Orel
144144
sudo sh -c 'echo "deb [arch=amd64] https://repo.postgrespro.ru/pg_probackup-forks/deb/ stretch main-stretch" > /etc/apt/sources.list.d/pg_probackup.list'
145145
sudo wget -O - https://repo.postgrespro.ru/pg_probackup-forks/keys/GPG-KEY-PG_PROBACKUP | sudo apt-key add - && sudo apt-get update
146-
sudo apt-get install pg-probackup-{std,ent}-{12,11,10,9.6}{-dbg,}
146+
sudo apt-get install pg-probackup-{std,ent}-{12,11,10}{-dbg,}
147147

148148

149149
#RPM Centos Packages
150150
rpm -ivh https://repo.postgrespro.ru/pg_probackup-forks/keys/pg_probackup-repo-forks-centos.noarch.rpm
151-
yum install pg_probackup-{std,ent}-{13,12,11,10,9.6}
152-
yum install pg_probackup-{std,ent}-{13,12,11,10,9.6}-debuginfo
151+
yum install pg_probackup-{std,ent}-{13,12,11,10}
152+
yum install pg_probackup-{std,ent}-{13,12,11,10}-debuginfo
153153

154154
#RPM RHEL Packages
155155
rpm -ivh https://repo.postgrespro.ru/pg_probackup-forks/keys/pg_probackup-repo-forks-rhel.noarch.rpm
156-
yum install pg_probackup-{std,ent}-{13,12,11,10,9.6}
157-
yum install pg_probackup-{std,ent}-{13,12,11,10,9.6}-debuginfo
156+
yum install pg_probackup-{std,ent}-{13,12,11,10}
157+
yum install pg_probackup-{std,ent}-{13,12,11,10}-debuginfo
158158

159159
#RPM Oracle Linux Packages
160160
rpm -ivh https://repo.postgrespro.ru/pg_probackup-forks/keys/pg_probackup-repo-forks-oraclelinux.noarch.rpm
161-
yum install pg_probackup-{std,ent}-{13,12,11,10,9.6}
162-
yum install pg_probackup-{std,ent}-{13,12,11,10,9.6}-debuginfo
161+
yum install pg_probackup-{std,ent}-{13,12,11,10}
162+
yum install pg_probackup-{std,ent}-{13,12,11,10}-debuginfo
163163

164164
#RPM ALT Linux 7
165165
sudo sh -c 'echo "rpm https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/altlinux-p7 x86_64 forks" > /etc/apt/sources.list.d/pg_probackup_forks.list'
166166
sudo apt-get update
167-
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10,9.6}
168-
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10,9.6}-debuginfo
167+
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10}
168+
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10}-debuginfo
169169

170170
#RPM ALT Linux 8
171171
sudo sh -c 'echo "rpm https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/altlinux-p8 x86_64 forks" > /etc/apt/sources.list.d/pg_probackup_forks.list'
172172
sudo apt-get update
173-
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10,9.6}
174-
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10,9.6}-debuginfo
173+
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10}
174+
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10}-debuginfo
175175

176176
#RPM ALT Linux 9
177177
sudo sh -c 'echo "rpm https://repo.postgrespro.ru/pg_probackup-forks/rpm/latest/altlinux-p9 x86_64 forks" > /etc/apt/sources.list.d/pg_probackup_forks.list' && sudo apt-get update
178-
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10,9.6}
179-
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10,9.6}-debuginfo
178+
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10}
179+
sudo apt-get install pg_probackup-{std,ent}-{13,12,11,10}-debuginfo
180180
```
181181

182182
Once you have `pg_probackup` installed, complete [the setup](https://postgrespro.github.io/pg_probackup/#pbk-install-and-setup).

src/backup.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,7 @@ do_backup_pg(InstanceState *instanceState, PGconn *backup_conn,
133133
pg_start_backup(label, smooth_checkpoint, &current, nodeInfo, backup_conn);
134134

135135
/* Obtain current timeline */
136-
#if PG_VERSION_NUM >= 90600
137136
current.tli = get_current_timeline(backup_conn);
138-
#else
139-
/* PG-9.5 */
140-
current.tli = get_current_timeline_from_control(FIO_DB_HOST, instance_config.pgdata, false);
141-
#endif
142137

143138
/*
144139
* In incremental backup mode ensure that already-validated
@@ -1053,7 +1048,6 @@ pg_start_backup(const char *label, bool smooth, pgBackup *backup,
10531048

10541049
/*
10551050
* Switch to a new WAL segment. It should be called only for master.
1056-
* For PG 9.5 it should be called only if pguser is superuser.
10571051
*/
10581052
void
10591053
pg_switch_wal(PGconn *conn)
@@ -1062,11 +1056,7 @@ pg_switch_wal(PGconn *conn)
10621056

10631057
pg_silent_client_messages(conn);
10641058

1065-
#if PG_VERSION_NUM >= 100000
10661059
res = pgut_execute(conn, "SELECT pg_catalog.pg_switch_wal()", 0, NULL);
1067-
#else
1068-
res = pgut_execute(conn, "SELECT pg_catalog.pg_switch_xlog()", 0, NULL);
1069-
#endif
10701060

10711061
PQclear(res);
10721062
}

src/catchup.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,7 @@ catchup_init_state(PGNodeInfo *source_node_info, const char *source_pgdata, cons
6666
source_node_info->is_ptrack_enabled = pg_is_ptrack_enabled(source_conn, source_node_info->ptrack_version_num);
6767

6868
/* Obtain current timeline */
69-
#if PG_VERSION_NUM >= 90600
7069
current.tli = get_current_timeline(source_conn);
71-
#else
72-
/* PG-9.5 */
73-
instance_config.pgdata = source_pgdata;
74-
current.tli = get_current_timeline_from_control(FIO_DB_HOST, source_pgdata, false);
75-
#endif
7670

7771
elog(INFO, "Catchup start, pg_probackup version: %s, "
7872
"PostgreSQL version: %s, "
@@ -1033,7 +1027,6 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
10331027
if (!dry_run)
10341028
wait_wal_and_calculate_stop_lsn(dest_xlog_path, stop_backup_result.lsn, &current);
10351029

1036-
#if PG_VERSION_NUM >= 90600
10371030
/* Write backup_label */
10381031
Assert(stop_backup_result.backup_label_content != NULL);
10391032
if (!dry_run)
@@ -1061,7 +1054,6 @@ do_catchup(const char *source_pgdata, const char *dest_pgdata, int num_threads,
10611054
stop_backup_result.tablespace_map_content = NULL;
10621055
stop_backup_result.tablespace_map_content_len = 0;
10631056
}
1064-
#endif
10651057

10661058
/* wait for end of wal streaming and calculate wal size transfered */
10671059
if (!dry_run)

src/parsexlog.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,8 @@
2929
* RmgrNames is an array of resource manager names, to make error messages
3030
* a bit nicer.
3131
*/
32-
#if PG_VERSION_NUM >= 100000
3332
#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup,mask) \
3433
name,
35-
#else
36-
#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
37-
name,
38-
#endif
3934

4035
static const char *RmgrNames[RM_MAX_ID + 1] = {
4136
#include "access/rmgrlist.h"

src/pg_probackup.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ pid_t my_pid = 0;
7878
__thread int my_thread_num = 1;
7979
bool progress = false;
8080
bool no_sync = false;
81-
#if PG_VERSION_NUM >= 100000
8281
char *replication_slot = NULL;
8382
bool temp_slot = false;
84-
#endif
8583
bool perm_slot = false;
8684

8785
/* backup options */
@@ -205,9 +203,7 @@ static ConfigOption cmd_options[] =
205203
{ 'f', 'b', "backup-mode", opt_backup_mode, SOURCE_CMD_STRICT },
206204
{ 'b', 'C', "smooth-checkpoint", &smooth_checkpoint, SOURCE_CMD_STRICT },
207205
{ 's', 'S', "slot", &replication_slot, SOURCE_CMD_STRICT },
208-
#if PG_VERSION_NUM >= 100000
209206
{ 'b', 181, "temp-slot", &temp_slot, SOURCE_CMD_STRICT },
210-
#endif
211207
{ 'b', 'P', "perm-slot", &perm_slot, SOURCE_CMD_STRICT },
212208
{ 'b', 182, "delete-wal", &delete_wal, SOURCE_CMD_STRICT },
213209
{ 'b', 183, "delete-expired", &delete_expired, SOURCE_CMD_STRICT },
@@ -905,14 +901,13 @@ main(int argc, char *argv[])
905901
wal_file_name, instanceState->instance_name, instance_config.system_identifier, system_id);
906902
}
907903

908-
#if PG_VERSION_NUM >= 100000
909904
if (temp_slot && perm_slot)
910905
elog(ERROR, "You cannot specify \"--perm-slot\" option with the \"--temp-slot\" option");
911906

912907
/* if slot name was not provided for temp slot, use default slot name */
913908
if (!replication_slot && temp_slot)
914909
replication_slot = DEFAULT_TEMP_SLOT_NAME;
915-
#endif
910+
916911
if (!replication_slot && perm_slot)
917912
replication_slot = DEFAULT_PERMANENT_SLOT_NAME;
918913

src/pg_probackup.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,8 @@ extern const char *PROGRAM_EMAIL;
6565
#define DATABASE_DIR "database"
6666
#define BACKUPS_DIR "backups"
6767
#define WAL_SUBDIR "wal"
68-
#if PG_VERSION_NUM >= 100000
6968
#define PG_XLOG_DIR "pg_wal"
7069
#define PG_LOG_DIR "log"
71-
#else
72-
#define PG_XLOG_DIR "pg_xlog"
73-
#define PG_LOG_DIR "pg_log"
74-
#endif
7570
#define PG_TBLSPC_DIR "pg_tblspc"
7671
#define PG_GLOBAL_DIR "global"
7772
#define BACKUP_CONTROL_FILE "backup.control"
@@ -777,11 +772,8 @@ extern bool stream_wal;
777772
extern bool show_color;
778773
extern bool progress;
779774
extern bool is_archive_cmd; /* true for archive-{get,push} */
780-
/* In pre-10 'replication_slot' is defined in receivelog.h */
781775
extern char *replication_slot;
782-
#if PG_VERSION_NUM >= 100000
783776
extern bool temp_slot;
784-
#endif
785777
extern bool perm_slot;
786778

787779
/* backup options */

0 commit comments

Comments
 (0)