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

Commit 0421001

Browse files
committed
Squashed 'contrib/pg_shardman/' changes from ce2d63f..3a90ceb
3a90ceb Updating metadata in-place during replica promotion. b39ae6d Docs blunder fix. 0da7cd1 rm_node refactored. 4315bd8 Grant needed perms in add_node instead of requiring DBA to set up them. e8dfc7b Non-superuser test, docs fix on it. 5fa9e00 rm_node mapping update fixed. b5dcd19 mv_partition failure cleanup: tmp LR channel and tables. 417549c Updating part location in mv_partition before sending new mappings. f452912 recover() improvements. 62b0e33 alter_ftable_set_server in mv_part. 4bd380a Typo. 2080545 Fix recover_xacts with no prepared xacts. c75d18c Removing foreign server to removed node properly. 2c93841 Previous commit fix: warn if we can't resolve xact. f6691f2 recover_xacts comments and docs. 20fa71b Minor doc fixes, pt_cleanup(). ff423db Adding edges for all locked objects in deadlock detection. af0374f Docs update, testing deadlocks. 9c1dd2a recovery() renamed to recover, major docs update. 59fb1ff Test set_redundancy and rebalance, bunch of little fixes, readme. 0f3866d Basic tests, add_node existing node check, wipe_state func. 6f84422 Add recover_xacts() functions 00a1429 More portable way of determining pg_shardman location. 713e2d5 Add postgres_fdw and pathman to EXTRA_INSTALL, proper temp conf. git-subtree-dir: contrib/pg_shardman git-subtree-split: 3a90ceb
1 parent d6d046c commit 0421001

9 files changed

+2638
-930
lines changed

Makefile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,25 @@ MODULE_big = pg_shardman
1010
OBJS = pg_shardman.o
1111
PGFILEDESC = "pg_shardman - sharding for Postgres"
1212

13-
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) # abs path to this makefile
14-
mkfile_dir := $(shell basename $(shell dirname $(dir $(mkfile_path)))) # parent dir of the project
1513
ifndef USE_PGXS # hmm, user didn't requested to use pgxs
16-
ifneq ($(strip $(mkfile_dir)),contrib) # a-ha, but we are not inside 'contrib' dir
14+
# relative path to this makefile
15+
mkfile_path := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
16+
# relative path to dir with this makefile
17+
mkfile_dir := $(dir $(mkfile_path))
18+
# abs path to dir with this makefile
19+
mkfile_abspath := $(shell cd $(mkfile_dir) && pwd -P)
20+
# parent dir name of directory with makefile
21+
parent_dir_name := $(shell basename $(shell dirname $(mkfile_abspath)))
22+
ifneq ($(parent_dir_name),contrib) # a-ha, but this shardman is not inside 'contrib' dir
1723
USE_PGXS := 1 # so use it anyway, most probably that's what the user wants
1824
endif
1925
endif
26+
# $(info) is introduced in 3.81, and PG doesn't support makes older than 3.80
27+
ifeq ($(MAKE_VERSION),3.80)
28+
$(warning $$USE_PGXS is [${USE_PGXS}] (we use it automatically if not in contrib dir))
29+
else
2030
$(info $$USE_PGXS is [${USE_PGXS}] (we use it automatically if not in contrib dir))
31+
endif
2132

2233
ifdef USE_PGXS # use pgxs
2334
# You can specify path to pg_config in PG_CONFIG var
@@ -32,11 +43,15 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
3243
include $(PGXS)
3344

3445
else # assume the extension is in contrib/ dir of pg distribution
46+
# install pg_pathman and postgres_fdw too
47+
EXTRA_INSTALL = contrib/pg_pathman contrib/postgres_fdw
3548
PG_CPPFLAGS = -I$(libpq_srcdir) # include libpq-fe, defined in Makefile.global.in
3649
SHLIB_LINK = $(libpq) # defined in Makefile.global.in
3750
SHLIB_PREREQS = submake-libpq
3851
subdir = contrib/pg_shardman
3952
top_builddir = ../..
53+
# Add pathman to shared preload libraries when running regression tests
54+
EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/conf.add
4055
include $(top_builddir)/src/Makefile.global
4156
include $(top_srcdir)/contrib/contrib-global.mk
4257
endif

conf.add

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shared_preload_libraries='pg_shardman, pg_pathman'

0 commit comments

Comments
 (0)