Skip to content

Commit 84f14d9

Browse files
committed
Merged new version of pg_probackup
2 parents efeaaec + a401fe3 commit 84f14d9

Some content is hidden

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

54 files changed

+3513
-2068
lines changed

contrib/pg_probackup/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,18 @@
2525
/regression.diffs
2626
/regression.out
2727
/results
28+
/env
29+
/tests/__pycache__/
30+
/tests/tmp_dirs/
2831

2932
# Extra files
3033
/datapagemap.c
3134
/datapagemap.h
35+
/logging.h
36+
/receivelog.c
37+
/receivelog.h
38+
/streamutil.c
39+
/streamutil.h
3240
/xlogreader.c
3341
/logging.h
3442
/receivelog.c

contrib/pg_probackup/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ OBJS = backup.o \
1919
streamutil.o \
2020
receivelog.o \
2121
pgut/pgut.o \
22-
pgut/pgut-port.o
22+
pgut/pgut-port.o \
23+
pgut/getopt_long.o
2324

2425
EXTRA_CLEAN = datapagemap.c datapagemap.h xlogreader.c receivelog.c receivelog.h streamutil.c streamutil.h logging.h
2526

26-
REGRESS = init option show delete backup restore
27-
2827
all: checksrcdir datapagemap.h logging.h receivelog.h streamutil.h pg_probackup
2928

3029
MAKE_GLOBAL="../../src/Makefile.global"
@@ -54,6 +53,10 @@ PG_CPPFLAGS = -I$(libpq_srcdir) ${PTHREAD_CFLAGS}
5453
override CPPFLAGS := -DFRONTEND $(CPPFLAGS) $(PG_CPPFLAGS)
5554
PG_LIBS = $(libpq_pgport) ${PTHREAD_CFLAGS}
5655

56+
ifeq ($(PORTNAME), aix)
57+
CC=xlc_r
58+
endif
59+
5760
envtest:
5861
: top_srcdir=$(top_srcdir)
5962
: libpq_srcdir = $(libpq_srcdir)

contrib/pg_probackup/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,28 @@ All the documentation you can find [here](doc/pg_probackup.md).
5555
Regression tests
5656
----------------
5757

58-
The test suite of pg_probackup is available in the code tree and can be
59-
launched in a way similar to common PostgreSQL extensions and modules:
58+
For tests you must have python 2.7 or python 3.3 and higher. Also good idea
59+
is make virtual enviroment by `virtualenv`.
60+
First of all you need to install `testgres` python module which contains useful
61+
functions to start postgres clusters and make queries:
62+
63+
```
64+
pip install testgres
65+
```
66+
67+
To run tests execute:
68+
69+
```
70+
python -m unittest tests
71+
```
72+
73+
from current (root of project) directory. If you want to run a specific postgres build then
74+
you should specify the path to your pg_config executable by setting PG_CONFIG
75+
environment variable:
76+
```
77+
export PG_CONFIG=/path/to/pg_config
78+
```
6079

61-
make installcheck
6280

6381
Block level incremental backup
6482
------------------------------
@@ -98,6 +116,7 @@ You need to enable WAL archive by adding following lines to postgresql.conf:
98116

99117
```
100118
wal_level = archive
119+
archive_mode = on
101120
archive_command = 'test ! -f /home/postgres/backup/wal/%f && cp %p /home/postgres/backup/wal/%f'
102121
```
103122

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy