Skip to content

fix chunk_table row traversal and update pgrx to 0.19.2 - #278

Open
Vonng wants to merge 2 commits into
ChuckHend:mainfrom
pgsty:codex/fix-chunk-table-pgrx-0.19.2
Open

fix chunk_table row traversal and update pgrx to 0.19.2#278
Vonng wants to merge 2 commits into
ChuckHend:mainfrom
pgsty:codex/fix-chunk-table-pgrx-0.19.2

Conversation

@Vonng

@Vonng Vonng commented Sep 6, 2026

Copy link
Copy Markdown

chunk_table reads at most one tuple with Spi::get_two, so it reports success while silently omitting subsequent source rows. Iterate the full SPI result through a mutable connection, preserving the existing chunking and transactional insertion behavior. Empty inputs now create an empty output table instead of raising an SPI positioning error.

Pin pgrx and pgrx-tests to =0.19.2, check in the extension-local Cargo.lock, and declare Rust 1.96 as the minimum version. Remove the obsolete embed binary declaration and source, which use the removed pgrx_embed! macro. The SQL/control version remains 0.23.0.

The CI follow-up fixes three failures observed on this PR:

  • Both Docker images built successfully but their GHCR uploads were denied for the fork PR. Continue building both architectures on PRs, and restrict login, upload, and manifest publication to publishing events. Run tests requiring private provider credentials only on upstream events that can access those secrets.
  • The upgrade workflow tried to build v0.20.0, which supports PostgreSQL 14–17, against PostgreSQL 18. Initialize and use PG17 throughout the upgrade, including Cargo test features. Restore the exact tested commit after checking out the old tag. Seed the old version's test_static fixture using the local embedding service, and verify its retained embeddings and search after ALTER EXTENSION before the regular tests recreate the extension.
  • test_table_from crossed a minute boundary: its active cron job correctly processed the third row while the test expected two. Register and pause that cron job in one transaction, and poll for the realtime worker result with a timeout.

Validation:

  • Initial package validation on Rocky Linux 9.8 ARM64, PostgreSQL 17.11, Rust 1.98.0, and cargo-pgrx 0.19.2: main RPM, debuginfo, debugsource, payload, DWARF, runtime dependencies, and the chunk-table SQL regression passed.
  • CI follow-up on the same native EL9 ARM64/PG17 environment: compiled the modified integration test binary with --release --no-default-features --features pg17 --locked --offline; executed test_chunk_table and test_table_from. A deterministic local embedding stub delayed the realtime response across an actual minute boundary; both tests passed. This tests scheduling and row counts, not model quality.
  • Exercised the new upgrade SQL assertions against a local fixture: retained embeddings/search passed and missing embeddings were rejected. The full old-version-to-new-version upgrade remains for upstream CI.
  • Exercised PR/push/release command selection and pgrx initialization cache-hit, cache-miss, explicit-PG17, default-PG18, and failure-propagation paths with command stubs. Rustfmt, whitespace checks, and actionlint syntax checks passed; existing obsolete-action and custom-runner warnings were excluded from the actionlint check.

Fixes #277

@Vonng
Vonng requested a review from ChuckHend as a code owner September 6, 2026 12:19
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.

chunk_table silently processes only the first input row

1 participant