Skip to content

Commit 96b4aa7

Browse files
author
Marina Polyakova
committed
ICU: fix: run default collation tests during make (install)check-world
Thanks to Alexander Lakhin for reporting this.
0 parents  commit 96b4aa7

Some content is hidden

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

86 files changed

+34878
-0
lines changed

.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Object files
2+
*.o
3+
4+
# Libraries
5+
*.lib
6+
*.a
7+
8+
# Shared objects (inc. Windows DLLs)
9+
*.dll
10+
*.so
11+
*.so.*
12+
*.dylib
13+
14+
# Executables
15+
*.exe
16+
*.app
17+
18+
# Dependencies
19+
.deps
20+
21+
# Binaries
22+
/pg_probackup
23+
24+
# Generated by test suite
25+
/regression.diffs
26+
/regression.out
27+
/results
28+
/env
29+
/tests/__pycache__/
30+
/tests/helpers/__pycache__/
31+
/tests/tmp_dirs/
32+
/tests/*pyc
33+
/tests/helpers/*pyc
34+
35+
# Extra files
36+
/src/datapagemap.c
37+
/src/datapagemap.h
38+
/src/logging.h
39+
/src/receivelog.c
40+
/src/receivelog.h
41+
/src/streamutil.c
42+
/src/streamutil.h
43+
/src/xlogreader.c
44+
/src/walmethods.c
45+
/src/walmethods.h

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sudo: required
2+
3+
services:
4+
- docker
5+
6+
script:
7+
- docker run -v $(pwd):/tests --rm centos:7 /tests/travis/backup_restore.sh

COPYRIGHT

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Copyright (c) 2015-2017, Postgres Professional
2+
Portions Copyright (c) 2009-2013, NIPPON TELEGRAPH AND TELEPHONE CORPORATION
3+
4+
Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
5+
Portions Copyright (c) 1994, The Regents of the University of California
6+
7+
Redistribution and use in source and binary forms, with or without
8+
modification, are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright
13+
notice, this list of conditions and the following disclaimer in the
14+
documentation and/or other materials provided with the distribution.
15+
* Neither the name of the NIPPON TELEGRAPH AND TELEPHONE CORPORATION
16+
(NTT) nor the names of its contributors may be used to endorse or
17+
promote products derived from this software without specific prior
18+
written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
PROGRAM = pg_probackup
2+
OBJS = src/backup.o src/catalog.o src/configure.o src/data.o \
3+
src/delete.o src/dir.o src/fetch.o src/help.o src/init.o \
4+
src/pg_probackup.o src/restore.o src/show.o src/status.o \
5+
src/util.o src/validate.o src/datapagemap.o src/parsexlog.o \
6+
src/xlogreader.o src/streamutil.o src/receivelog.o \
7+
src/archive.o src/utils/parray.o src/utils/pgut.o src/utils/logger.o \
8+
src/utils/json.o src/utils/thread.o src/merge.o
9+
10+
EXTRA_CLEAN = src/datapagemap.c src/datapagemap.h src/xlogreader.c \
11+
src/receivelog.c src/receivelog.h src/streamutil.c src/streamutil.h src/logging.h
12+
13+
INCLUDES = src/datapagemap.h src/logging.h src/receivelog.h src/streamutil.h
14+
15+
ifdef USE_PGXS
16+
PG_CONFIG = pg_config
17+
PGXS := $(shell $(PG_CONFIG) --pgxs)
18+
include $(PGXS)
19+
# !USE_PGXS
20+
else
21+
subdir=contrib/pg_probackup
22+
top_builddir=../..
23+
include $(top_builddir)/src/Makefile.global
24+
include $(top_srcdir)/contrib/contrib-global.mk
25+
endif # USE_PGXS
26+
27+
ifeq ($(top_srcdir),../..)
28+
ifeq ($(LN_S),ln -s)
29+
srchome=$(top_srcdir)/..
30+
endif
31+
else
32+
srchome=$(top_srcdir)
33+
endif
34+
35+
ifneq (,$(filter 10 11 12,$(MAJORVERSION)))
36+
OBJS += src/walmethods.o
37+
EXTRA_CLEAN += src/walmethods.c src/walmethods.h
38+
INCLUDES += src/walmethods.h
39+
endif
40+
41+
PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS} -Isrc -I$(top_srcdir)/$(subdir)/src
42+
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
43+
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
44+
45+
all: checksrcdir $(INCLUDES);
46+
47+
$(PROGRAM): $(OBJS)
48+
49+
src/xlogreader.c: $(top_srcdir)/src/backend/access/transam/xlogreader.c
50+
rm -f $@ && $(LN_S) $(srchome)/src/backend/access/transam/xlogreader.c $@
51+
src/datapagemap.c: $(top_srcdir)/src/bin/pg_rewind/datapagemap.c
52+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_rewind/datapagemap.c $@
53+
src/datapagemap.h: $(top_srcdir)/src/bin/pg_rewind/datapagemap.h
54+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_rewind/datapagemap.h $@
55+
src/logging.h: $(top_srcdir)/src/bin/pg_rewind/logging.h
56+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_rewind/logging.h $@
57+
src/receivelog.c: $(top_srcdir)/src/bin/pg_basebackup/receivelog.c
58+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/receivelog.c $@
59+
src/receivelog.h: $(top_srcdir)/src/bin/pg_basebackup/receivelog.h
60+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/receivelog.h $@
61+
src/streamutil.c: $(top_srcdir)/src/bin/pg_basebackup/streamutil.c
62+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/streamutil.c $@
63+
src/streamutil.h: $(top_srcdir)/src/bin/pg_basebackup/streamutil.h
64+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/streamutil.h $@
65+
66+
67+
ifneq (,$(filter 10 11 12,$(MAJORVERSION)))
68+
src/walmethods.c: $(top_srcdir)/src/bin/pg_basebackup/walmethods.c
69+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/walmethods.c $@
70+
src/walmethods.h: $(top_srcdir)/src/bin/pg_basebackup/walmethods.h
71+
rm -f $@ && $(LN_S) $(srchome)/src/bin/pg_basebackup/walmethods.h $@
72+
endif
73+
74+
ifeq ($(PORTNAME), aix)
75+
CC=xlc_r
76+
endif
77+
78+
# This rule's only purpose is to give the user instructions on how to pass
79+
# the path to PostgreSQL source tree to the makefile.
80+
.PHONY: checksrcdir
81+
checksrcdir:
82+
ifndef top_srcdir
83+
@echo "You must have PostgreSQL source tree available to compile."
84+
@echo "Pass the path to the PostgreSQL source tree to make, in the top_srcdir"
85+
@echo "variable: \"make top_srcdir=<path to PostgreSQL source tree>\""
86+
@exit 1
87+
endif

README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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 utility is compatible with:
6+
* PostgreSQL 9.5, 9.6, 10;
7+
8+
`PTRACK` backup support provided via following options:
9+
* vanilla PostgreSQL compiled with ptrack patch. Currently there are patches for [PostgreSQL 9.6](https://gist.githubusercontent.com/gsmol/5b615c971dfd461c76ef41a118ff4d97/raw/e471251983f14e980041f43bea7709b8246f4178/ptrack_9.6.6_v1.5.patch) and [PostgreSQL 10](https://gist.githubusercontent.com/gsmol/be8ee2a132b88463821021fd910d960e/raw/de24f9499f4f314a4a3e5fae5ed4edb945964df8/ptrack_10.1_v1.5.patch)
10+
* Postgres Pro Standard 9.5, 9.6
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+
* `DELTA` backup. In this mode, `pg_probackup` read all data files in PGDATA directory and only those pages, that where changed since previous backup, are copied. Continuous archiving is not necessary for it to operate. Also this mode could impose read-only I/O pressure equal to `Full` backup.
31+
* `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.
32+
33+
Regardless of the chosen backup type, all backups taken with `pg_probackup` support the following archiving strategies:
34+
* `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.
35+
* `Archive backups` rely on continuous archiving. Such backups enable cluster recovery to an arbitrary point after the backup was taken (point-in-time recovery).
36+
37+
## Limitations
38+
39+
`pg_probackup` currently has the following limitations:
40+
* Creating backups from a remote server is currently not supported.
41+
* 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.
42+
* Microsoft Windows operating system is not supported.
43+
* Configuration files outside of PostgreSQL data directory are not included into the backup and should be backed up separately.
44+
45+
## Installation and Setup
46+
### Linux Installation
47+
```shell
48+
#DEB Ubuntu|Debian Packages
49+
echo "deb [arch=amd64] http://repo.postgrespro.ru/pg_probackup/deb/ $(lsb_release -cs) main-$(lsb_release -cs)" > /etc/apt/sources.list.d/pg_probackup.list
50+
wget -O - http://repo.postgrespro.ru/pg_probackup/keys/GPG-KEY-PG_PROBACKUP | apt-key add - && apt-get update
51+
apt-get install pg-probackup-{10,9.6,9.5}
52+
53+
#DEB-SRC Packages
54+
echo "deb-src [arch=amd64] http://repo.postgrespro.ru/pg_probackup/deb/ $(lsb_release -cs) main-$(lsb_release -cs)" >>\
55+
/etc/apt/sources.list.d/pg_probackup.list
56+
apt-get source pg-probackup-{10,9.6,9.5}
57+
58+
#RPM Centos Packages
59+
rpm -ivh http://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-centos.noarch.rpm
60+
yum install pg_probackup-{10,9.6,9.5}
61+
62+
#RPM RHEL Packages
63+
rpm -ivh http://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-rhel.noarch.rpm
64+
yum install pg_probackup-{10,9.6,9.5}
65+
66+
#RPM Oracle Linux Packages
67+
rpm -ivh http://repo.postgrespro.ru/pg_probackup/keys/pg_probackup-repo-oraclelinux.noarch.rpm
68+
yum install pg_probackup-{10,9.6,9.5}
69+
70+
#SRPM Packages
71+
yumdownloader --source pg_probackup-{10,9.6,9.5}
72+
```
73+
74+
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:
75+
76+
```shell
77+
make USE_PGXS=1 PG_CONFIG=<path_to_pg_config> top_srcdir=<path_to_PostgreSQL_source_tree>
78+
```
79+
80+
Once you have `pg_probackup` installed, complete [the setup](https://postgrespro.com/docs/postgrespro/current/app-pgprobackup.html#pg-probackup-install-and-setup).
81+
82+
## Documentation
83+
84+
Currently the latest documentation can be found at [Postgres Pro Enterprise documentation](https://postgrespro.com/docs/postgrespro/current/app-pgprobackup).
85+
86+
## Licence
87+
88+
This module available under the same license as [PostgreSQL](https://www.postgresql.org/about/licence/).
89+
90+
## Feedback
91+
92+
Do not hesitate to post your issues, questions and new ideas at the [issues](https://github.com/postgrespro/pg_probackup/issues) page.
93+
94+
## Authors
95+
96+
Postgres Professional, Moscow, Russia.
97+
98+
## Credits
99+
100+
`pg_probackup` utility is based on `pg_arman`, that was originally written by NTT and then developed and maintained by Michael Paquier.

doit.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
perl win32build.pl "C:\PgProject\pgwininstall-ee\builddir\distr_X64_10.4.1\postgresql" "C:\PgProject\pgwininstall-ee\builddir\postgresql\postgrespro-enterprise-10.4.1\src"

doit96.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
perl win32build96.pl "C:\PgPro96" "C:\PgProject\pg96ee\postgrespro\src"

0 commit comments

Comments
 (0)