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

Commitc6306db

Browse files
committed
Add 'basebackup_to_shell' contrib module.
As a demonstration of the sort of thing that can be done by adding acustom backup target, this defines a 'shell' target which executes acommand defined by the system administrator. The command is executedonce for each tar archive generate by the backup and once for thebackup manifest, if any. Each time the command is executed, itreceives the contents of th file for which it is executed via standardinput.The configured command can use %f to refer to the name of the archive(e.g. base.tar, $TABLESPACE_OID.tar, backup_manifest) and %d to referto the target detail (pg_basebackup --target shell:DETAIL). A targetdetail is required if %d appears in the configured command andforbidden if it does not.Patch by me, reviewed by Abhijit Menon-Sen.Discussion:http://postgr.es/m/CA+TgmoaqvdT-u3nt+_kkZ7bgDAyqDB0i-+XOMmr5JN2Rd37hxw@mail.gmail.com
1 parente4ba69f commitc6306db

File tree

6 files changed

+510
-0
lines changed

6 files changed

+510
-0
lines changed

‎contrib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SUBDIRS = \
1010
auth_delay\
1111
auto_explain\
1212
basic_archive\
13+
basebackup_to_shell\
1314
bloom\
1415
btree_gin\
1516
btree_gist\

‎contrib/basebackup_to_shell/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# contrib/basebackup_to_shell/Makefile
2+
3+
MODULE_big = basebackup_to_shell
4+
OBJS =\
5+
$(WIN32RES)\
6+
basebackup_to_shell.o
7+
8+
PGFILEDESC = "basebackup_to_shell - target basebackup to shell command"
9+
10+
ifdefUSE_PGXS
11+
PG_CONFIG = pg_config
12+
PGXS :=$(shell$(PG_CONFIG) --pgxs)
13+
include$(PGXS)
14+
else
15+
subdir = contrib/basebackup_to_shell
16+
top_builddir = ../..
17+
include$(top_builddir)/src/Makefile.global
18+
include$(top_srcdir)/contrib/contrib-global.mk
19+
endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp