Conversation
pgserver bundles a self-contained postgres server, compiling PostgreSQL 16.2 and the pgvector 0.6.2 extension from source via its own Makefile (cibuildwheel before-all = "make"), not a vendored prebuilt binary. Neither PostgreSQL's spinlock/atomics fallback (generic gcc __sync builtins) nor pgvector 0.6.2 (no SIMD dispatch at this version) gate on architecture, so this is an ordinary build-from-checkout port mirroring upstream's own manylinux cibuildwheel job.
Add 0001-Add-LICENSE.postgresql-and-LICENSE.pgvector-matching.patch: the checkout carries no license text for the PostgreSQL or pgvector sources it compiles and bundles into every wheel, so neither reaches dist-info/licenses/. Apply it before the build and assert both land in the wheel alongside pgserver's own LICENSE.
luhenry
added a commit
that referenced
this pull request
Sep 24, 2026
Contributor
|
All four riscv64 build legs failed identically after 30+ minutes,
partway through compiling pgvector (fetched and built by pgserver's
own pgbuild/Makefile): GCC on manylinux_2_39_riscv64 rejects
`-march=native` outright ("ISA string must begin with rv32 or rv64"),
which pgvector's Makefile passes unconditionally except for Mac ARM
and ppc64.
Add patches/pgserver/0.1.4/0002-*.patch, overriding OPTFLAGS to empty
on the pgbuild/Makefile invocations that build pgvector, the same way
pgvector's own Makefile already blanks it for architectures that
reject -march=native. Verified the patch applies cleanly (alone and
together with the existing 0001 licensing patch) against a fresh
v0.1.4 checkout.
check_commit_messages was failing on an older run (35966092162) but
passes on the current HEAD's latest run; no commit-message change
needed.
cp312/cp313/cp314 all reproduced the same crash identically across three independent riscv64 runners: pgserver's from-source-built initdb dies with SIGSEGV on its very first invocation (test_get_server), and on every invocation after. That is real and, without riscv64 hardware to debug interactively, unresolved (documented as gotcha 564 in a follow-up bookkeeping commit to main) - configure correctly detects native __sync/__atomic builtins and the build passes no aggressive flags, so it isn't an obvious atomics-fallback or -march problem. What's actionable now: test_reuse_deleted_datadir_short starts a server in a multiprocessing.Process and then blocks on queue.get() with no timeout; when the child dies from the initdb segfault it never puts anything on the queue, so the parent (and the whole job) hangs until the workflow's 180-minute timeout kills it - a full runner-hour cycle spent confirming a crash pytest had already reported seconds in. Bound it from the workflow side (gotcha 563): CIBW_TEST_REQUIRES: pytest-timeout plus PYTEST_ADDOPTS="--timeout=300" folded into the existing CIBW_ENVIRONMENT line, which cibuildwheel applies to both the build and test phases. No patch to pgserver's own source needed - its test-command has no room to pass extra pytest flags, but CIBW_ENVIRONMENT reaches it anyway.
luhenry
added a commit
that referenced
this pull request
Sep 24, 2026
…lved PR #2276 (pgserver 0.1.4) hung for the full 180-minute job timeout on cp312/cp313/cp314: the from-source-built initdb segfaults on riscv64 on every invocation (not just the test whose name suggested a short-path edge case), and the test that happened to be running when it crashed blocks forever in multiprocessing.Queue.get() with no timeout instead of failing fast. Recorded here for whoever picks this up next: gotcha 565 generalizes the hang-bounding fix (CIBW_TEST_REQUIRES: pytest-timeout), gotcha 566 documents what's already ruled out on the segfault itself (atomics detection, -march flags) and what's still needed (riscv64 hardware or working QEMU user-mode emulation, neither available in this session) to actually root-cause it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pgserver0.1.4Compiles PostgreSQL 16.2 and the pgvector 0.6.2 extension from source and bundles the resulting install tree as a self-contained embedded postgres server. Upstream publishes no riscv64 wheel.
Mirrors upstream's
build-and-test.yml.Differs from upstream
Testing
License: Wheel bundles PostgreSQL 16.2 and pgvector 0.6.2 (both the permissive, non-copyleft PostgreSQL License); upstream ships neither license text, so the build adds them.
Patches
0001-Add-LICENSE.postgresql-and-LICENSE.pgvector-matching.patch- To upstream, not submitted from this port run. Without it, dist-info/licenses/ omits both bundled projects' license text.