Skip to content

wasm 17.4 pglite-wasm #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 59 commits into
base: REL_17_4_WASM
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
438a19c
REL_17_4_WASM pglite-wasm + buildtools
pmp-p Mar 11, 2025
2c519b8
wip ci for pglite-web
pmp-p Mar 11, 2025
dcbe083
CI for pglite web
pmp-p Mar 11, 2025
4a88798
docker build starts, but fails at some moment
Mar 12, 2025
aa26dde
pre apply pglite stage patches
pmp-p Mar 13, 2025
9435dac
cleanup
pmp-p Mar 13, 2025
29d71f5
workaround tag build link
pmp-p Mar 17, 2025
38c9f4b
wrong place for tagged files
pmp-p Mar 17, 2025
585723a
fix name mix up
pmp-p Mar 17, 2025
702308a
remove dup lines
pmp-p Mar 17, 2025
c7af7ee
remove ping test
pmp-p Mar 17, 2025
c12dbc8
restore missing functions
pmp-p Mar 17, 2025
ac89019
docker improvements
Mar 17, 2025
cf4cceb
copy dist files
Mar 17, 2025
c686d9d
update gitignore
Mar 17, 2025
85e0363
stop poluting the host file system with the intermediary build output
Mar 17, 2025
e9503bd
paths
pmp-p Mar 18, 2025
def80e9
test
pmp-p Mar 18, 2025
f2828a4
Update build-with-docker.sh
pmp-p Mar 18, 2025
a07451c
workaround for release build opts
pmp-p Mar 18, 2025
1ae6d2e
typo
pmp-p Mar 18, 2025
914d569
specify exactly where extensions tarball go
pmp-p Mar 18, 2025
62efe31
move pglite to dist/pglite
pmp-p Mar 18, 2025
48dd0f5
revert gathering of artifacts
Mar 18, 2025
4ac7daf
fixes
Mar 18, 2025
04683ec
use buildconfig as docker env file
pmp-p Mar 18, 2025
02607ab
force overwrite
Mar 18, 2025
df70710
Merge branch 'REL_17_4_WASM-pglite' of github.com:electric-sql/postgr…
Mar 18, 2025
8d1ea44
test
pmp-p Mar 18, 2025
0032793
Merge branch 'REL_17_4_WASM-pglite' of github.com:electric-sql/postgr…
Mar 18, 2025
971aeb3
fix bundled zic can fail
pmp-p Mar 18, 2025
894737e
Update .buildconfig
pmp-p Mar 18, 2025
e9d587f
allow use of system zic
pmp-p Mar 18, 2025
9655c6c
run with DEBUG false
Mar 19, 2025
00aa9ff
Merge branch 'REL_17_4_WASM-pglite' of github.com:electric-sql/postgr…
Mar 19, 2025
ed78e78
use docker --env-file
Mar 19, 2025
d064018
fix
Mar 19, 2025
d143f6b
fence debug verbosity
pmp-p Mar 25, 2025
f56bad3
update PGlite docker builder image (#23)
tdrz Apr 11, 2025
f419501
discard input in cma-wire auth
pmp-p Apr 14, 2025
856c0ce
do not break on connection exit ( for socket gw )
pmp-p Apr 14, 2025
7a7c244
typo
pmp-p Apr 14, 2025
331de58
Tudor/debug wasm (#27)
tdrz May 2, 2025
da677ad
EH pipeline fix, REPL loop fix (#28)
pmp-p May 7, 2025
d40b613
Merge branch 'REL_17_4_WASM' into REL_17_4_WASM-pglite
pmp-p May 12, 2025
1049802
Merge branch 'REL_17_4_WASM' into REL_17_4_WASM-pglite
pmp-p May 12, 2025
a236e99
17_4 pglite alpha
pmp-p May 12, 2025
c45636b
speed (#30)
tdrz May 12, 2025
874575a
build config path
pmp-p May 12, 2025
0af4381
build config for CI
pmp-p May 12, 2025
a57e95e
fix damaged makefile
pmp-p May 12, 2025
5d4ac6f
build wasm with expected file paths; disable optimizations when build…
tdrz May 14, 2025
a317c2b
move DEBG env var outside of .buildconfig such that it can be set by …
tdrz May 19, 2025
e258e62
cleanup/native/cma->socketfiles (#34)
pmp-p May 21, 2025
9a984a0
extensions support with reduced core size
pmp-p Jun 11, 2025
8040a5b
wrong search/replace
pmp-p Jun 16, 2025
3468afa
fix full sym build
pmp-p Jun 16, 2025
66346ca
fix debug mode
pmp-p Jun 16, 2025
b4921ef
fix debug build
pmp-p Jun 16, 2025
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
13 changes: 13 additions & 0 deletions .buildconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PG_VERSION=17.4
PG_BRANCH=REL_17_4_WASM

SDK_VERSION=3.1.74.6bi
WASI_SDK_VERSION=25.0.0
SDKROOT=/tmp/sdk

PG_DIST=/tmp/sdk/dist
PG_DIST_EXT=/tmp/sdk/dist/extensions-emsdk
CI=true

GETZIC=false
ZIC=/usr/sbin/zic
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ lib*.pc
/src/backend/commands/async.c
/src/bin/initdb/initdb.c
/src/bin/pg_verifybackup/pg_verifybackup.c
/build
/pglite/dist/**
/pglite/patches
/patches/
/dist/pglite
/dist
40 changes: 20 additions & 20 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4328,7 +4328,7 @@ else
ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
CFLAGS="-g2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

Expand Down Expand Up @@ -4359,7 +4359,7 @@ if ac_fn_c_try_compile "$LINENO"; then :

else
ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
CFLAGS="-g2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

Expand Down Expand Up @@ -4387,13 +4387,13 @@ if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
CFLAGS="-g2 -Os"
else
CFLAGS="-g"
CFLAGS="-g2"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
CFLAGS="-Os"
else
CFLAGS=
fi
Expand Down Expand Up @@ -4859,7 +4859,7 @@ else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
CXXFLAGS="-g"
CXXFLAGS="-g2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

Expand Down Expand Up @@ -4890,7 +4890,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then :

else
ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
CXXFLAGS="-g2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

Expand Down Expand Up @@ -4918,13 +4918,13 @@ if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
CXXFLAGS="-g2 -Os"
else
CXXFLAGS="-g"
CXXFLAGS="-g2"
fi
else
if test "$GXX" = yes; then
CXXFLAGS="-O2"
CXXFLAGS="-Os"
else
CXXFLAGS=
fi
Expand Down Expand Up @@ -5284,11 +5284,11 @@ elif test "${CFLAGS+set}" = set; then
elif test "$enable_coverage" = yes; then
: # no optimization by default
elif test "$GCC" = yes; then
CFLAGS="-O2"
CFLAGS="-Os"
else
# if the user selected debug mode, don't use -O
if test "$enable_debug" != yes; then
CFLAGS="-O"
CFLAGS="-Os"
fi
fi

Expand All @@ -5299,11 +5299,11 @@ elif test "${CXXFLAGS+set}" = set; then
elif test "$enable_coverage" = yes; then
: # no optimization by default
elif test "$GCC" = yes; then
CXXFLAGS="-O2"
CXXFLAGS="-Os"
else
# if the user selected debug mode, don't use -O
if test "$enable_debug" != yes; then
CXXFLAGS="-O"
CXXFLAGS="-Os"
fi
fi

Expand All @@ -5316,12 +5316,12 @@ fi
if test "$ac_env_BITCODE_CFLAGS_set" = set; then
BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
else
BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
BITCODE_CFLAGS="-Os $BITCODE_CFLAGS"
fi
if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
else
BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
BITCODE_CXXFLAGS="-Os $BITCODE_CXXFLAGS"
fi

# C[XX]FLAGS we determined above will be added back at the end
Expand Down Expand Up @@ -7656,11 +7656,11 @@ fi

# supply -g if --enable-debug
if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
CFLAGS="$CFLAGS -g"
CFLAGS="$CFLAGS -g2"
fi

if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
CXXFLAGS="$CXXFLAGS -g"
CXXFLAGS="$CXXFLAGS -g2"
fi

# enable code coverage if --enable-coverage
Expand Down Expand Up @@ -13313,7 +13313,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
char uuid_export ();
extern char uuid_export ();
int
main ()
{
Expand All @@ -13336,7 +13336,7 @@ $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
UUID_LIBS="-luuid"
else
as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
ac_cv_lib_ossp_uuid_uuid_export=yes
fi

fi
Expand Down
36 changes: 36 additions & 0 deletions extra/pg_ivm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

. wasm-build/extension.sh

pushd $PG_EXTRA
if [ -d pg_ivm ]
then
echo using local pgpg_ivm
else
wget https://github.com/sraoss/pg_ivm/archive/refs/tags/v1.11.tar.gz -O-|tar xfz -
mv pg_ivm-* pg_ivm

# git clone --recursive --no-tags --depth 1 --single-branch --branch main https://github.com/sraoss/pg_ivm

if $WASI
then
echo "no patching"
else
echo "PATCH?"

fi

fi
popd

pushd $PG_EXTRA/pg_ivm
# path for wasm-shared already set to (pwd:pg build dir)/bin
# OPTFLAGS="" turns off arch optim (sse/neon).
PG_CONFIG=${PGROOT}/bin/pg_config emmake make OPTFLAGS="" install || exit 19

#cp sql/pg_ivm--1.10.sql ${PGROOT}/share/postgresql/extension/
#rm -f ${PGROOT}/share/postgresql/extension/pg_ivm--?.?.?--?.?.?.sql ${PGROOT}/share/postgresql/extension/pg_ivm.sql

popd


27 changes: 27 additions & 0 deletions extra/vector.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

. wasm-build/extension.sh

pushd $PG_EXTRA
# [ -d pgvector ] || git clone --no-tags --depth 1 --single-branch --branch master https://github.com/pgvector/pgvector

if [ -d vector ]
then
echo using local pgvector
else
wget -c -q https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.0.tar.gz -Opgvector.tar.gz
tar xvfz pgvector.tar.gz
mv pgvector-?.?.? vector
fi
popd

pushd $PG_EXTRA/vector
# path for wasm-shared already set to (pwd:pg build dir)/bin
# OPTFLAGS="" turns off arch optim (sse/neon).
PG_CONFIG=${PGROOT}/bin/pg_config emmake make OPTFLAGS="" install || exit 21

cp sql/vector--0.8.0.sql ${PGROOT}/share/postgresql/extension/
rm ${PGROOT}/share/postgresql/extension/vector--?.?.?--?.?.?.sql
popd


Loading