Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
[submodule "pglite/other_extensions/pgmq"]
path = pglite/other_extensions/pgmq
url = https://github.com/pgmq/pgmq
[submodule "pglite/other_extensions/pg_partman"]
path = pglite/other_extensions/pg_partman
url = https://github.com/pgpartman/pg_partman.git
19 changes: 18 additions & 1 deletion pglite/other_extensions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ ARCHIVE_DIR := /pglite/extensions/other
EXTENSIONS := $(SUBDIRS)
EXTENSIONS += postgis

# NOTE: pg_partman is deliberately not in SUBDIRS: its default target would compile the
# background worker, which cannot run in WASM. It is built SQL-only via its own
# dist rule below with NO_BGW=1 (which is an officially supported pg_partman build mode).
EXTENSIONS += pg_partman

# Default target: build tarballs for all contribs
dist: $(addsuffix .tar.gz,$(EXTENSIONS))

Expand Down Expand Up @@ -46,6 +51,18 @@ age.tar.gz:
files=$$(find . -type f -o -type l | sed 's|^\./||') && \
tar -czf $(ARCHIVE_DIR)/age.tar.gz $$files

# pg_partman's core is pure SQL/PLpgSQL; NO_BGW=1 skips its background worker C module
pg_partman.tar.gz:
@echo "=== Staging pg_partman (SQL-only, NO_BGW=1) ==="
rm -rf $(EXTENSIONS_BUILD_ROOT)/pg_partman
bash -c 'mkdir -p $(EXTENSIONS_BUILD_ROOT)/pg_partman/$(prefix)/{bin,lib,share/extension,share/doc,share/postgresql/extension}'
$(MAKE) -C pg_partman NO_BGW=1 install DESTDIR=$(EXTENSIONS_BUILD_ROOT)/pg_partman
@echo "=== Packaging pg_partman ==="
mkdir -p $(ARCHIVE_DIR)
cd $(EXTENSIONS_BUILD_ROOT)/pg_partman/$(prefix) && \
files=$$(find . -type f -o -type l | sed 's|^\./||') && \
tar -czf $(ARCHIVE_DIR)/pg_partman.tar.gz $$files

dist-postgis:
@echo "=== Adding proj data to postgis archive ==="
gunzip $(ARCHIVE_DIR)/postgis.tar.gz
Expand All @@ -59,4 +76,4 @@ archive_clean:
rm -rf $(EXTENSIONS_BUILD_ROOT)/$*
rm -rf $(ARCHIVE_DIR)

$(recurse)
$(recurse)
1 change: 1 addition & 0 deletions pglite/other_extensions/pg_partman
Submodule pg_partman added at f7e83b