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

Commit af9ac47

Browse files
committed
Merge branch 'PGPRO9_6' into PGPROEE9_6
Conflicts: doc/src/sgml/installation-bin.sgml src/include/pg_config.h.win32
2 parents b4d2b44 + a87bfc0 commit af9ac47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2684
-1436
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2758,7 +2758,7 @@ else
27582758
fi
27592759

27602760

2761-
PGPRO_VERSION="$PACKAGE_VERSION.1"
2761+
PGPRO_VERSION="$PACKAGE_VERSION.2"
27622762
PGPRO_PACKAGE_NAME="PostgresPro"
27632763
PGPRO_EDITION="enterprise"
27642764

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major versio
3838
PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
3939
[PG_VERSION="$PACKAGE_VERSION$withval"],
4040
[PG_VERSION="$PACKAGE_VERSION"])
41-
PGPRO_VERSION="$PACKAGE_VERSION.1"
41+
PGPRO_VERSION="$PACKAGE_VERSION.2"
4242
PGPRO_PACKAGE_NAME="PostgresPro"
4343
PGPRO_EDITION="enterprise"
4444
AC_SUBST(PGPRO_PACKAGE_NAME)

contrib/pg_probackup/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
/results
2828
/env
2929
/tests/__pycache__/
30+
/tests/helpers/__pycache__/
3031
/tests/tmp_dirs/
3132
/tests/*pyc
3233
/tests/helpers/*pyc
@@ -40,3 +41,5 @@
4041
/src/streamutil.c
4142
/src/streamutil.h
4243
/src/xlogreader.c
44+
/src/walmethods.c
45+
/src/walmethods.h

contrib/pg_probackup/Makefile

Lines changed: 28 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,40 @@ OBJS = src/backup.o src/catalog.o src/configure.o src/data.o \
99
EXTRA_CLEAN = src/datapagemap.c src/datapagemap.h src/xlogreader.c \
1010
src/receivelog.c src/receivelog.h src/streamutil.c src/streamutil.h src/logging.h
1111

12-
all: checksrcdir src/datapagemap.h src/logging.h src/receivelog.h src/streamutil.h pg_probackup
12+
INCLUDES = src/datapagemap.h src/logging.h src/receivelog.h src/streamutil.h
1313

1414
ifdef USE_PGXS
1515
PG_CONFIG = pg_config
1616
PGXS := $(shell $(PG_CONFIG) --pgxs)
1717
include $(PGXS)
18-
ifndef top_srcdir
19-
@echo "You must have PostgreSQL source tree available to compile."
20-
@echo "Pass the path to the PostgreSQL source tree to make, in the top_srcdir"
21-
@echo "variable: \"make top_srcdir=<path to PostgreSQL source tree>\""
22-
@exit 1
23-
endif
24-
# Those files are symlinked from the PostgreSQL sources.
25-
src/xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/xlogreader.c
26-
rm -f $@ && $(LN_S) $< ./src/xlogreader.c
27-
src/datapagemap.c: % : $(top_srcdir)/src/bin/pg_rewind/datapagemap.c
28-
rm -f $@ && $(LN_S) $< ./src/datapagemap.c
29-
src/datapagemap.h: % : $(top_srcdir)/src/bin/pg_rewind/datapagemap.h
30-
rm -f $@ && $(LN_S) $< src/datapagemap.h
31-
src/logging.h: % : $(top_srcdir)/src/bin/pg_rewind/logging.h
32-
rm -f $@ && $(LN_S) $< ./src
33-
src/receivelog.c: % : $(top_srcdir)/src/bin/pg_basebackup/receivelog.c
34-
rm -f $@ && $(LN_S) $< ./src
35-
src/receivelog.h: % : $(top_srcdir)/src/bin/pg_basebackup/receivelog.h
36-
rm -f $@ && $(LN_S) $< ./src
37-
src/streamutil.c: % : $(top_srcdir)/src/bin/pg_basebackup/streamutil.c
38-
rm -f $@ && $(LN_S) $< ./src
39-
src/streamutil.h: % : $(top_srcdir)/src/bin/pg_basebackup/streamutil.h
40-
rm -f $@ && $(LN_S) $< ./src
18+
# !USE_PGXS
4119
else
4220
subdir=contrib/pg_probackup
4321
top_builddir=../..
4422
include $(top_builddir)/src/Makefile.global
4523
include $(top_srcdir)/contrib/contrib-global.mk
46-
ifeq ("$(top_srcdir)","../..")
47-
srchome="$(top_srcdir)/.."
24+
endif # USE_PGXS
25+
26+
ifeq ($(top_srcdir),../..)
27+
srchome=$(top_srcdir)/..
4828
else
49-
srchome="$(top_srcdir)"
29+
srchome=$(top_srcdir)
30+
endif
31+
32+
ifeq ($(MAJORVERSION),10)
33+
OBJS += src/walmethods.o
34+
EXTRA_CLEAN += src/walmethods.c src/walmethods.h
35+
INCLUDES += src/walmethods.h
5036
endif
51-
# Those files are symlinked from the PostgreSQL sources.
37+
38+
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS} -Isrc
39+
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
40+
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
41+
42+
all: checksrcdir $(INCLUDES);
43+
44+
$(PROGRAM): $(OBJS)
45+
5246
src/xlogreader.c: $(top_srcdir)/src/backend/access/transam/xlogreader.c
5347
rm -f $@ && $(LN_S) $(srchome)/src/backend/access/transam/xlogreader.c $@
5448
src/datapagemap.c: $(top_srcdir)/src/bin/pg_rewind/datapagemap.c
@@ -65,20 +59,18 @@ src/streamutil.c: $(top_srcdir)/src/bin/pg_basebackup/streamutil.c
6559
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/streamutil.c $@
6660
src/streamutil.h: $(top_srcdir)/src/bin/pg_basebackup/streamutil.h
6761
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/streamutil.h $@
68-
endif
6962

70-
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS} -Isrc
71-
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
72-
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
63+
ifeq ($(MAJORVERSION),10)
64+
src/walmethods.c: $(top_srcdir)/src/bin/pg_basebackup/walmethods.c
65+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/walmethods.c $@
66+
src/walmethods.h: $(top_srcdir)/src/bin/pg_basebackup/walmethods.h
67+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/walmethods.h $@
68+
endif
7369

7470
ifeq ($(PORTNAME), aix)
7571
CC=xlc_r
7672
endif
7773

78-
envtest:
79-
: top_srcdir=$( )
80-
: libpq_srcdir = $(libpq_srcdir)
81-
8274
# This rule's only purpose is to give the user instructions on how to pass
8375
# the path to PostgreSQL source tree to the makefile.
8476
.PHONY: checksrcdir

contrib/pg_probackup/README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# pg_probackup
2+
3+
`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.
4+
5+
The extension is compatible with:
6+
* PostgreSQL 9.5, 9.6, 10;
7+
8+
`PTRACK` backup requires:
9+
* Postgres Pro Standard 9.5, 9.6;
10+
or
11+
* Postgres Pro Enterprise;
12+
13+
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:
14+
* Choosing between full and page-level incremental backups to speed up backup and recovery
15+
* Implementing a single backup strategy for multi-server PostgreSQL clusters
16+
* Automatic data consistency checks and on-demand backup validation without actual data recovery
17+
* Managing backups in accordance with retention policy
18+
* Running backup, restore, and validation processes on multiple parallel threads
19+
* Storing backup data in a compressed state to save disk space
20+
* Taking backups from a standby server to avoid extra load on the master server
21+
* Extended logging settings
22+
* Custom commands to simplify WAL log archiving
23+
24+
To manage backup data, `pg_probackup` creates a backup catalog. This directory stores all backup files with additional meta information, as well as WAL archives required for [point-in-time recovery](https://postgrespro.com/docs/postgresql/current/continuous-archiving.html). You can store backups for different instances in separate subdirectories of a single backup catalog.
25+
26+
Using `pg_probackup`, you can take full or incremental backups:
27+
* `Full` backups contain all the data files required to restore the database cluster from scratch.
28+
* `Incremental` backups only store the data that has changed since the previous backup. It allows to decrease the backup size and speed up backup operations. `pg_probackup` supports the following modes of incremental backups:
29+
* `PAGE` backup. In this mode, `pg_probackup` scans all WAL files in the archive from the moment the previous full or incremental backup was taken. Newly created backups contain only the pages that were mentioned in WAL records. This requires all the WAL files since the previous backup to be present in the WAL archive. If the size of these files is comparable to the total size of the database cluster files, speedup is smaller, but the backup still takes less space.
30+
* `PTRACK` backup. In this mode, PostgreSQL tracks page changes on the fly. Continuous archiving is not necessary for it to operate. Each time a relation page is updated, this page is marked in a special `PTRACK` bitmap for this relation. As one page requires just one bit in the `PTRACK` fork, such bitmaps are quite small. Tracking implies some minor overhead on the database server operation, but speeds up incremental backups significantly.
31+
32+
Regardless of the chosen backup type, all backups taken with `pg_probackup` support the following archiving strategies:
33+
* `Autonomous backups` include all the files required to restore the cluster to a consistent state at the time the backup was taken. Even if continuous archiving is not set up, the required WAL segments are included into the backup.
34+
* `Archive backups` rely on continuous archiving. Such backups enable cluster recovery to an arbitrary point after the backup was taken (point-in-time recovery).
35+
36+
## Limitations
37+
38+
`pg_probackup` currently has the following limitations:
39+
* Creating backups from a remote server is currently not supported.
40+
* The server from which the backup was taken and the restored server must be compatible by the [block_size](https://postgrespro.com/docs/postgresql/current/runtime-config-preset#guc-block-size) and [wal_block_size](https://postgrespro.com/docs/postgresql/current/runtime-config-preset#guc-wal-block-size) parameters and have the same major release number.
41+
* Microsoft Windows operating system is not supported.
42+
* Configuration files outside of PostgreSQL data directory are not included into the backup and should be backed up separately.
43+
44+
## Installation and Setup
45+
46+
To compile `pg_probackup`, you must have a PostgreSQL installation and raw source tree. To install `pg_probackup`, execute this in the module's directory:
47+
48+
```shell
49+
make USE_PGXS=1 PG_CONFIG=<path_to_pg_config> top_srcdir=<path_to_PostgreSQL_source_tree>
50+
```
51+
52+
Once you have `pg_probackup` installed, complete [the setup](https://postgrespro.com/docs/postgrespro/current/app-pgprobackup.html#pg-probackup-install-and-setup).
53+
54+
## Documentation
55+
56+
Currently the latest documentation can be found at [Postgres Pro Enterprise documentation](https://postgrespro.com/docs/postgrespro/current/app-pgprobackup).
57+
58+
## Licence
59+
60+
This module available under the same license as [PostgreSQL](https://www.postgresql.org/about/licence/).
61+
62+
## Feedback
63+
64+
Do not hesitate to post your issues, questions and new ideas at the [issues](https://github.com/postgrespro/pg_probackup/issues) page.
65+
66+
## Authors
67+
68+
Postgres Professional, Moscow, Russia.
69+
70+
## Credits
71+
72+
`pg_probackup` utility is based on `pg_arman`, that was originally written by NTT and then developed and maintained by Michael Paquier.

contrib/pg_probackup/doc/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)