Skip to content
Merged
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
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.5.1.054-orioledb"
postgres17: "17.6.1.033"
postgres15: "15.14.1.033"
postgresorioledb-17: "17.5.1.055-orioledb"
postgres17: "17.6.1.034"
postgres15: "15.14.1.034"

# Non Postgres Extensions
pgbouncer_release: 1.19.0
Expand Down
160 changes: 0 additions & 160 deletions nix/ext/plv8.nix

This file was deleted.

83 changes: 83 additions & 0 deletions nix/ext/plv8/0001-build-Allow-using-V8-from-system-3.1.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From e473bab9483d937d8cab4313b9b45de0571c20fa Mon Sep 17 00:00:00 2001
From: Jan Tojnar <[email protected]>
Date: Thu, 13 Oct 2022 10:16:32 +0200
Subject: [PATCH] build: Allow using V8 from system

Building V8 is slow and pointless on systems that already provide a recent version like some Linux distros.
With this change, you can build against system V8 with the following:

make USE_SYSTEM_V8=1 SHLIB_LINK=-lv8 V8_OUTDIR=/usr/lib
---
Makefile | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index 2f1f9f1..cfa50bc 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ OBJS = $(SRCS:.cc=.o)
MODULE_big = plv8-$(PLV8_VERSION)
EXTENSION = plv8
PLV8_DATA = plv8.control plv8--$(PLV8_VERSION).sql $(wildcard upgrade/*.sql)
-
+USE_SYSTEM_V8 = 0

# Platform detection
ifeq ($(OS),Windows_NT)
@@ -41,6 +41,7 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
PG_VERSION_NUM := $(shell cat `$(PG_CONFIG) --includedir-server`/pg_config*.h \
| perl -ne 'print $$1 and exit if /PG_VERSION_NUM\s+(\d+)/')

+ifeq ($(USE_SYSTEM_V8),0)
AUTOV8_DIR = build/v8
AUTOV8_OUT = build/v8/out.gn/obj
AUTOV8_STATIC_LIBS = -lv8_libplatform -lv8_libbase
@@ -63,21 +64,6 @@ v8:
endif


-# enable direct jsonb conversion by default
-CCFLAGS += -DJSONB_DIRECT_CONVERSION
-
-CCFLAGS += -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1
-
-CCFLAGS += -I$(AUTOV8_DIR)/include -I$(AUTOV8_DIR)
-
-ifdef EXECUTION_TIMEOUT
- CCFLAGS += -DEXECUTION_TIMEOUT
-endif
-
-ifdef BIGINT_GRACEFUL
- CCFLAGS += -DBIGINT_GRACEFUL
-endif
-

# We're gonna build static link. Rip it out after include Makefile
SHLIB_LINK := $(filter-out -lv8, $(SHLIB_LINK))
@@ -97,6 +83,23 @@ else
SHLIB_LINK += -lrt -std=c++14
endif
endif
+endif
+
+# enable direct jsonb conversion by default
+CCFLAGS += -DJSONB_DIRECT_CONVERSION
+
+CCFLAGS += -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1
+
+CCFLAGS += -I$(AUTOV8_DIR)/include -I$(AUTOV8_DIR)
+
+ifdef EXECUTION_TIMEOUT
+ CCFLAGS += -DEXECUTION_TIMEOUT
+endif
+
+ifdef BIGINT_GRACEFUL
+ CCFLAGS += -DBIGINT_GRACEFUL
+endif
+

DATA = $(PLV8_DATA)
ifndef DISABLE_DIALECT
--
2.49.0

84 changes: 84 additions & 0 deletions nix/ext/plv8/0001-build-Allow-using-V8-from-system-3.1.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
From 7523ea5bced10511688e73f6261857c04726a8a9 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <[email protected]>
Date: Thu, 13 Oct 2022 10:16:32 +0200
Subject: [PATCH] build: Allow using V8 from system

Building V8 is slow and pointless on systems that already provide a recent version like some Linux distros.
With this change, you can build against system V8 with the following:

make USE_SYSTEM_V8=1 SHLIB_LINK=-lv8 V8_OUTDIR=/usr/lib
---
Makefile | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/Makefile b/Makefile
index 38879cc..a6abae5 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ OBJS = $(SRCS:.cc=.o)
MODULE_big = plv8-$(PLV8_VERSION)
EXTENSION = plv8
PLV8_DATA = plv8.control plv8--$(PLV8_VERSION).sql $(wildcard upgrade/*.sql)
+USE_SYSTEM_V8 = 0


# Platform detection
@@ -41,6 +42,7 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
PG_VERSION_NUM := $(shell cat `$(PG_CONFIG) --includedir-server`/pg_config*.h \
| perl -ne 'print $$1 and exit if /PG_VERSION_NUM\s+(\d+)/')

+ifeq ($(USE_SYSTEM_V8),0)
AUTOV8_DIR = build/v8
AUTOV8_OUT = build/v8/out.gn/obj
AUTOV8_STATIC_LIBS = -lv8_libplatform -lv8_libbase
@@ -67,22 +69,6 @@ v8:
endif
endif

-# enable direct jsonb conversion by default
-CCFLAGS += -DJSONB_DIRECT_CONVERSION
-
-CCFLAGS += -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1
-
-CCFLAGS += -I$(AUTOV8_DIR)/include -I$(AUTOV8_DIR)
-
-ifdef EXECUTION_TIMEOUT
- CCFLAGS += -DEXECUTION_TIMEOUT
-endif
-
-ifdef BIGINT_GRACEFUL
- CCFLAGS += -DBIGINT_GRACEFUL
-endif
-
-
# We're gonna build static link. Rip it out after include Makefile
SHLIB_LINK := $(filter-out -lv8, $(SHLIB_LINK))

@@ -101,6 +87,24 @@ else
SHLIB_LINK += -lrt -std=c++14
endif
endif
+endif
+
+
+# enable direct jsonb conversion by default
+CCFLAGS += -DJSONB_DIRECT_CONVERSION
+
+CCFLAGS += -DV8_COMPRESS_POINTERS=1 -DV8_31BIT_SMIS_ON_64BIT_ARCH=1
+
+CCFLAGS += -I$(AUTOV8_DIR)/include -I$(AUTOV8_DIR)
+
+ifdef EXECUTION_TIMEOUT
+ CCFLAGS += -DEXECUTION_TIMEOUT
+endif
+
+ifdef BIGINT_GRACEFUL
+ CCFLAGS += -DBIGINT_GRACEFUL
+endif
+

DATA = $(PLV8_DATA)
ifndef DISABLE_DIALECT
--
2.49.0

44 changes: 44 additions & 0 deletions nix/ext/plv8/0001-build-Allow-using-V8-from-system-3.2.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From bfe98c83bdcc0f3c33d836e03e6d4cf7199c8d37 Mon Sep 17 00:00:00 2001
From: Jan Tojnar <[email protected]>
Date: Thu, 13 Oct 2022 10:16:32 +0200
Subject: [PATCH] build: Allow using V8 from system

Building V8 is slow and pointless on systems that already provide a recent version like some Linux distros.
With this change, you can build against system V8 with the following:

make USE_SYSTEM_V8=1 SHLIB_LINK=-lv8 V8_OUTDIR=/usr/lib
---
Makefile | 3 +++
1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index 1180fae..c74b23d 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,7 @@ OBJS = $(SRCS:.cc=.o)
MODULE_big = plv8-$(PLV8_VERSION)
EXTENSION = plv8
PLV8_DATA = plv8.control plv8--$(PLV8_VERSION).sql
+USE_SYSTEM_V8 = 0

ifeq ($(OS),Windows_NT)
# noop for now
@@ -34,6 +35,7 @@ ifeq ($(NUMPROC),0)
NUMPROC = 1
endif

+ifeq ($(USE_SYSTEM_V8),0)
SHLIB_LINK += -Ldeps/v8-cmake/build

all: v8 $(OBJS)
@@ -48,6 +50,7 @@ deps/v8-cmake/build/libv8_libbase.a: deps/v8-cmake/README.md
@cd deps/v8-cmake && mkdir -p build && cd build && cmake -Denable-fPIC=ON -DCMAKE_BUILD_TYPE=Release ../ && make -j $(NUMPROC)

v8: deps/v8-cmake/build/libv8_libbase.a
+endif

# enable direct jsonb conversion by default
CCFLAGS += -DJSONB_DIRECT_CONVERSION
--
2.49.0

Loading