From 1bb6889aea2cf87f3f9136b18aa2077a76649b59 Mon Sep 17 00:00:00 2001 From: Tudor Zaharia Date: Sat, 27 Jun 2026 19:30:29 +0200 Subject: [PATCH 1/3] backend: pgmq implementation --- .gitmodules | 3 +++ pglite/build-pgmq.sh | 6 ++++++ pglite/other_extensions/Makefile | 5 +++-- pglite/other_extensions/pgmq | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 pglite/build-pgmq.sh create mode 160000 pglite/other_extensions/pgmq diff --git a/.gitmodules b/.gitmodules index 7a5873143bbf5..7510d1a707b74 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,3 +26,6 @@ [submodule "pglite/other_extensions/pg_textsearch"] path = pglite/other_extensions/pg_textsearch url = https://github.com/timescale/pg_textsearch/ +[submodule "pglite/other_extensions/pgmq"] + path = pglite/other_extensions/pgmq + url = https://github.com/pgmq/pgmq diff --git a/pglite/build-pgmq.sh b/pglite/build-pgmq.sh new file mode 100644 index 0000000000000..a00933e6f7da6 --- /dev/null +++ b/pglite/build-pgmq.sh @@ -0,0 +1,6 @@ +#!/bin/bash +pushd other_extensions/pgmq +# these flags are used in pgxs.mk (postgresql extension makefile) and passed to the build process of that extension +emmake make LDFLAGS_SL="-sWASM_BIGINT -sSIDE_MODULE=1" CFLAGS_SL="$PGLITE_CFLAGS -sWASM_BIGINT" +# emmake make PORTNAME=emscripten dist +popd \ No newline at end of file diff --git a/pglite/other_extensions/Makefile b/pglite/other_extensions/Makefile index 29e8d27dedb5d..601f0ffb12545 100644 --- a/pglite/other_extensions/Makefile +++ b/pglite/other_extensions/Makefile @@ -8,7 +8,8 @@ SUBDIRS = \ age \ pg_uuidv7 \ pg_hashids \ - pg_textsearch + pg_textsearch \ + pgmq/pgmq-extension prefix ?= /pglite EXTENSIONS_BUILD_ROOT := /tmp/extensions/build @@ -30,7 +31,7 @@ dist: $(addsuffix .tar.gz,$(EXTENSIONS)) mkdir -p $(ARCHIVE_DIR) cd $(EXTENSIONS_BUILD_ROOT)/$*/$(prefix) && \ files=$$(find . -type f -o -type l | sed 's|^\./||') && \ - tar -czf $(ARCHIVE_DIR)/$*.tar.gz $$files + tar -czf $(ARCHIVE_DIR)/$$(basename $*)\.tar.gz $$files # AGE requires SIZEOF_DATUM=4 for 32-bit WASM compatibility (strips PASSEDBYVALUE from graphid) age.tar.gz: diff --git a/pglite/other_extensions/pgmq b/pglite/other_extensions/pgmq new file mode 160000 index 0000000000000..56ae63734b790 --- /dev/null +++ b/pglite/other_extensions/pgmq @@ -0,0 +1 @@ +Subproject commit 56ae63734b790e59b7ebc25f7788a46f3cb97ff4 From 2483317eab3d5d3aaf970aa5561af8965b586a9d Mon Sep 17 00:00:00 2001 From: Tudor Zaharia Date: Sat, 27 Jun 2026 19:47:41 +0200 Subject: [PATCH 2/3] update pgmq to v1.11.1 --- pglite/other_extensions/pgmq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pglite/other_extensions/pgmq b/pglite/other_extensions/pgmq index 56ae63734b790..885251cf4dcb4 160000 --- a/pglite/other_extensions/pgmq +++ b/pglite/other_extensions/pgmq @@ -1 +1 @@ -Subproject commit 56ae63734b790e59b7ebc25f7788a46f3cb97ff4 +Subproject commit 885251cf4dcb4853d7fa253f56e382d84d5f0821 From 67f155f48c8e87228f9ad1c64645a6322b06782d Mon Sep 17 00:00:00 2001 From: Tudor Zaharia Date: Mon, 29 Jun 2026 12:04:59 +0200 Subject: [PATCH 3/3] remove unnecessary script --- pglite/build-pgmq.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 pglite/build-pgmq.sh diff --git a/pglite/build-pgmq.sh b/pglite/build-pgmq.sh deleted file mode 100644 index a00933e6f7da6..0000000000000 --- a/pglite/build-pgmq.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -pushd other_extensions/pgmq -# these flags are used in pgxs.mk (postgresql extension makefile) and passed to the build process of that extension -emmake make LDFLAGS_SL="-sWASM_BIGINT -sSIDE_MODULE=1" CFLAGS_SL="$PGLITE_CFLAGS -sWASM_BIGINT" -# emmake make PORTNAME=emscripten dist -popd \ No newline at end of file