Skip to content

ci(pg19): bump pgvector to v0.8.3 + Windows event-loop policy (cherry-pick from fix/pg19-compat-and-demo)#153

Merged
devopam merged 1 commit into
mainfrom
claude/pg19-pgvector-bump-and-windows
Jun 23, 2026
Merged

ci(pg19): bump pgvector to v0.8.3 + Windows event-loop policy (cherry-pick from fix/pg19-compat-and-demo)#153
devopam merged 1 commit into
mainfrom
claude/pg19-pgvector-bump-and-windows

Conversation

@devopam

@devopam devopam commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Cherry-picks the two valuable PG 19 compat fixes from your fix/pg19-compat-and-demo branch (which was based on an older main predating the Phase 3 PRs and would have wiped out ~1,800 lines if merged directly). Both fixes are rebased onto current main.

What's in

1. pgvector v0.8.0 → v0.8.3 in .github/ci-postgres-pg19.Dockerfile

This is the proper fix for the pgvector PG 19 compile issue I worked around in PR #152 with a best-effort try-and-continue. v0.8.3 carries upstream PG 19 support (LWLock API rename handled). Now the expected path is "build succeeds and vector tests run on the PG 19 matrix entry."

PR #152's safety-net wrapper stays so a future PG 20 / upstream-lag scenario doesn't gate the rest of the image — but the warning text is updated to reflect v0.8.3 being the new pin.

2. Windows event-loop policy in scripts/smoke_test_pg19.py

Adds:

if sys.platform == "win32":
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

Windows shells default to ProactorEventLoop which psycopg's async subsystem doesn't play well with. Selector loop runs cleanly. No-op on Linux / macOS.

What's intentionally left out

File Why skipped
scratch/fetch_pgvector.py Hardcoded c:\Users\devop\OneDrive\… path — personal local scratch
tests/unit/test_demo.py Imports from a demo module that doesn't exist on either branch — broken on land

Roadmap impact

Closes the practical concern behind roadmap row 14.1's pgvector-on-PG-19 follow-up. Once this merges + main rebuilds, vector tests should run on the PG 19 matrix entry instead of skipping.

After this lands you can safely delete the source branch fix/pg19-compat-and-demo.

Test plan

  • uv run ruff check scripts/smoke_test_pg19.py — clean
  • Next CI run: Tests (PG 19) job's image build step succeeds with v0.8.3
  • Vector-dependent integration tests no longer skip under PG 19

🤖 Generated with Claude Code

https://claude.ai/code/session_0122yLZLJ8t4W43sdN6BmTZc


Generated by Claude Code

…op policy in smoke harness

Two PG 19 compat fixes cherry-picked from your `fix/pg19-compat-and-demo`
branch and rebased onto current main:

1. Bump pgvector v0.8.0 → v0.8.3 in the PG 19 Dockerfile. v0.8.3 has
   PG 19 support (LWLock API rename handled upstream); v0.8.0 didn't.
   This is the *proper* fix that supersedes PR #152's best-effort
   try-and-continue fallback. The fallback wrapper stays as a safety
   net so a future PG 20 / upstream-lag scenario doesn't gate the
   rest of the image, but the expected path is now "build succeeds".

2. Add a Windows event-loop policy to `scripts/smoke_test_pg19.py`.
   Windows shells default to ProactorEventLoop which psycopg's async
   subsystem doesn't play well with — switch to selector loop when
   `sys.platform == 'win32'` so the smoke harness runs cleanly
   against a Windows-native test cluster. No-op on Linux / macOS.

Two other files in the source branch were intentionally left out:
* `scratch/fetch_pgvector.py` carries a hardcoded
  `c:\Users\devop\OneDrive\...` path — personal local scratch.
* `tests/unit/test_demo.py` imports from a `demo` module that
  doesn't exist on either branch — broken on land.

Roadmap impact: closes the practical concern behind row 14.1's
pgvector-on-PG-19 follow-up; vector tests can now run on the PG 19
matrix entry once main rebuilds.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122yLZLJ8t4W43sdN6BmTZc

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @devopam, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gemini-code-assist-2 gemini-code-assist-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the PG 19 CI Dockerfile to pin and build pgvector v0.8.3, which is compatible with PostgreSQL 19, while keeping the try-and-continue safety net. Additionally, it configures the WindowsSelectorEventLoopPolicy in the smoke test script when running on Windows to prevent connection errors with the psycopg async subsystem. I have no further feedback to provide as there are no review comments to evaluate.

@devopam devopam merged commit 62440e9 into main Jun 23, 2026
17 checks passed
@devopam devopam deleted the claude/pg19-pgvector-bump-and-windows branch June 23, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants