Skip to content

Apply v1.0.17#172

Merged
nettrash merged 3 commits intomasterfrom
v1.0.17
Apr 23, 2026
Merged

Apply v1.0.17#172
nettrash merged 3 commits intomasterfrom
v1.0.17

Conversation

@nettrash
Copy link
Copy Markdown
Owner

@nettrash nettrash commented Apr 23, 2026

Bug fixes:

  • PostgreSQL version agnostic handling of attstattarget
    attribute.
  • Replaced double .unwrap() in the dump serialization
    path with proper error propagation so a serde_json
    failure surfaces as a readable error instead of a
    panic.
  • compare_types no longer emits a stray
    -- Multirange … is created automatically comment for
    new range types. PostgreSQL auto-creates the
    companion multirange row when CREATE TYPE … AS RANGE
    runs, so the comparer now skips new-in-to
    multiranges in the CREATE branch (symmetric to the
    existing skip in the DROP branch). The skip is
    deliberately scoped to the new-type branch only — an
    existing multirange whose owner, comment, or ACL
    differs between dumps still reaches
    get_alter_script and emits the corresponding
    COMMENT ON TYPE / ALTER TYPE … OWNER TO. This
    was the leading cause of diffs looking "empty" on
    schemas that added a new range type.

Reliability:

  • Added FILL_SIBLING_BRANCH_COUNT constant with a
    compile-time arity guard against the outer try_join!
    in Dump::fill, plus a runtime warning when
    --max-connections / MAX_CONNECTIONS is below the
    number of parallel dump branches (pool starvation
    would otherwise go unnoticed).
  • Config::load now warns when FROM_* and TO_*
    resolve to the same host+port+database+schema, which
    almost always means a typo in the config file and
    silently produces an empty diff.

Tooling:

  • CI build job runs against both Rust 1.88.0 (floor)
    and 1.95.0 (matches the Dockerfile toolchain), so the
    shipped Docker image toolchain is CI-validated.
  • Dockerfile version / org.opencontainers.image.version
    labels are now filled from ARG PGC_VERSION wired
    through GitHub Actions from app/Cargo.toml — no
    more hard-coded version skew on release.

UX / Docs:

  • Fixed copy-pasted --server help text on --port
    and --scheme; documented the SIMILAR TO matching
    behaviour of --scheme (e.g. public|app) and
    expanded --grants-mode to describe ignore /
    addonly / full explicitly.
  • Added explanatory comments at every
    recreated_tables.insert() site documenting the
    coupling with compare_grants default-ACL handling
    for dropped-and-recreated tables.

Tests:

  • New buffer-ordering tests pin the emission order of
    the comparer's post-script buffers:
    sequence_post_script → type_post_script →
    enum_post_script → trigger_post_script.
  • Replaced .find().unwrap() assertions in the
    clear-script tests with a helper that panics with
    the full script, so ordering-test failures are
    actionable.
  • New multirange regression tests covering both sides
    of the fix:
    compare_types_multirange_not_created_independently
    (symptom fix) and
    compare_types_multirange_comment_change_still_emits_alter
    (guards against over-broad skipping — a metadata
    ALTER on an existing multirange must still emit).

superpav and others added 2 commits April 23, 2026 08:30
PostgreSQL version-agnostic handling of attstattarget attribute
@nettrash nettrash added this to the v1.0.17 milestone Apr 23, 2026
@nettrash nettrash self-assigned this Apr 23, 2026
Copilot AI review requested due to automatic review settings April 23, 2026 07:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Release bump to v1.0.17 focusing on PostgreSQL-dump correctness, improved reliability/UX warnings, and updated CI/Docker tooling alignment.

Changes:

  • Fix dump/comparison correctness (attstattarget type handling, multirange create-path noise removal) and improve error propagation for dump serialization.
  • Add reliability warnings (connection pool sizing vs parallel dump branches; FROM/TO config targeting the same DB+schema).
  • Update tooling/docs/tests (Rust CI matrix, Docker labels sourced from crate version, CLI help text, regression/ordering tests).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/src/main.rs Improves CLI help text for connection params, --scheme matching semantics, and --grants-mode explanation.
app/src/dump/table.rs Casts attstattarget to int4, refactors column query builder for testability, and updates stattarget parsing.
app/src/dump/core.rs Adds parallel-branch count constant + pool-size warning; replaces unwrap() serialization path with error propagation; adds arity “guard”.
app/src/config/core.rs Warns when FROM and TO resolve to the same host/port/database/scheme to avoid silent empty diffs.
app/src/comparer/core.rs Skips new-in-to multirange types in CREATE branch to avoid emitting no-op output.
app/src/comparer/core_tests.rs Adds multirange regressions and buffer-ordering tests to pin script concatenation order.
app/Cargo.toml Bumps crate version to 1.0.17.
app/Cargo.lock Updates lockfile version entry for 1.0.17.
Dockerfile Updates Rust toolchain image and sources version/OCI labels from PGC_VERSION build arg.
CHANGELOG Adds v1.0.17 release notes.
.github/workflows/rust.yml Runs CI against Rust 1.88.0 and 1.95.0; wires crate version into Docker build args for labels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/src/dump/core.rs Outdated
@nettrash nettrash merged commit 2db783e into master Apr 23, 2026
6 checks passed
@nettrash nettrash deleted the v1.0.17 branch April 23, 2026 07:47
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.

3 participants