Skip to content

Commit babd350

Browse files
committed
Merge remote-tracking branch 'origin/dev/pglogical-output' into dev/pglogical
2 parents 102a85c + 561030c commit babd350

Some content is hidden

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

59 files changed

+6718
-0
lines changed

contrib/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ SUBDIRS = \
3636
pg_trgm \
3737
pgcrypto \
3838
pglogical \
39+
pglogical_output \
40+
pglogical_output_plhooks \
3941
pgrowlocks \
4042
pgstattuple \
4143
postgres_fdw \

contrib/pglogical_output/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
pglogical_output.so
2+
results/
3+
regression.diffs
4+
tmp_install/
5+
tmp_check/
6+
log/
7+
pglogical_output.control

contrib/pglogical_output/Makefile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
MODULE_big = pglogical_output
2+
PGFILEDESC = "pglogical_output - logical replication output plugin"
3+
4+
OBJS = pglogical_output.o pglogical_hooks.o pglogical_config.o \
5+
pglogical_proto.o pglogical_proto_native.o \
6+
pglogical_proto_json.o pglogical_relmetacache.o \
7+
pglogical_infofuncs.o
8+
9+
REGRESS = prep params_native basic_native hooks_native basic_json hooks_json encoding_json extension cleanup
10+
11+
EXTENSION = pglogical_output
12+
DATA = pglogical_output--1.0.0.sql
13+
EXTRA_CLEAN += pglogical_output.control
14+
15+
16+
ifdef USE_PGXS
17+
18+
# For regression checks
19+
# http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com
20+
# this makes "make check" give a useful error
21+
abs_top_builddir = .
22+
NO_TEMP_INSTALL = yes
23+
# Usual recipe
24+
PG_CONFIG = pg_config
25+
PGXS := $(shell $(PG_CONFIG) --pgxs)
26+
include $(PGXS)
27+
28+
# These don't do anything yet, since temp install is disabled
29+
EXTRA_INSTALL += ./examples/hooks
30+
REGRESS_OPTS += --temp-config=regression.conf
31+
32+
plhooks:
33+
make -C examples/hooks USE_PGXS=1 clean install
34+
35+
installcheck: plhooks
36+
37+
else
38+
39+
subdir = contrib/pglogical_output
40+
top_builddir = ../..
41+
include $(top_builddir)/src/Makefile.global
42+
include $(top_srcdir)/contrib/contrib-global.mk
43+
44+
# 'make installcheck' disabled when building in-tree because these tests
45+
# require "wal_level=logical", which typical installcheck users do not have
46+
# (e.g. buildfarm clients).
47+
installcheck:
48+
;
49+
50+
EXTRA_INSTALL += contrib/pglogical_output_plhooks
51+
EXTRA_REGRESS_OPTS += --temp-config=./regression.conf
52+
53+
install: all
54+
55+
endif
56+
57+
# The # in #define is taken as a comment, per https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=142043
58+
# so it must be escaped. The $ placeholders in awk must be doubled too.
59+
pglogical_output_version=$(shell awk '/\#define PGLOGICAL_OUTPUT_VERSION[ \t]+\".*\"/ { print substr($$3,2,length($$3)-2) }' pglogical_output.h )
60+
61+
all: pglogical_output.control
62+
63+
pglogical_output.control: pglogical_output.control.in pglogical_output.h
64+
sed 's/__PGLOGICAL_OUTPUT_VERSION__/$(pglogical_output_version)/' pglogical_output.control.in > pglogical_output.control
65+
66+
install: header_install
67+
68+
header_install: pglogical_output/compat.h pglogical_output/hooks.h
69+
$(MKDIR_P) '$(DESTDIR)$(includedir)'/pglogical_output
70+
$(INSTALL_DATA) pglogical_output/compat.h '$(DESTDIR)$(includedir)'/pglogical_output
71+
$(INSTALL_DATA) pglogical_output/hooks.h '$(DESTDIR)$(includedir)'/pglogical_output

0 commit comments

Comments
 (0)