Skip to content

add PG19 to mise config - #134

Open
serprex wants to merge 1 commit into
mainfrom
pg19mise
Open

serprex wants to merge 1 commit into
mainfrom
pg19mise

Conversation

@serprex

@serprex serprex commented Oct 8, 2026

Copy link
Copy Markdown
Member

also use es_total_processed over es_processed

@serprex
serprex requested review from JoshDreamland and amogiska and a balanced review from Copilot October 8, 2026 18:10
@serprex
serprex marked this pull request as draft October 8, 2026 18:10

Copilot AI 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.

🟡 Changes recommended

The behavioral fix lacks regression coverage, and related usage and reference documentation remains outdated.

4 open findings
What changed in this PR

Adds PostgreSQL 19 development support and fixes cumulative row reporting for batched cursor execution.

Changes:

  • Adds PostgreSQL 19 mise build support.
  • Uses es_total_processed for cumulative row counts.
  • Documents PostgreSQL 19 compatibility.
File Description
src/​hooks/​hooks.c Reports cumulative processed rows.
scripts/​run-tests.sh Lists PostgreSQL 19 support.
mise.toml Adds PostgreSQL 19 tooling and build task.
CLAUDE.md Documents PostgreSQL 19 build and API differences.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/hooks/hooks.c
Comment thread mise.toml
Comment on lines +123 to +125
[tasks."build:19"]
run = "rm -rf build && cmake --preset default -DPG_CONFIG=$(mise where postgres@19)/bin/pg_config && cmake --build build"
description = "Build for PostgreSQL 19"
Comment thread scripts/run-tests.sh
usage() {
echo "Usage: $0 <PG_VERSION|PG_PATH> [test_type] [test_filter]"
echo " PG_VERSION: PostgreSQL version (16, 17, 18) - uses mise"
echo " PG_VERSION: PostgreSQL version (16, 17, 18, 19) - uses mise"
Comment thread src/hooks/hooks.c Outdated
Comment on lines +387 to +390
// es_processed only counts the last ExecutorRun call; cursors/portals that
// fetch in batches run multiple times. es_total_processed accumulates across
// all runs (PG14+, same counter pg_stat_statements switched to).
event->rows = query_desc->estate->es_total_processed;
@serprex
serprex marked this pull request as ready for review October 8, 2026 20:21
also use es_total_processed over es_processed
Copilot AI balanced review requested due to automatic review settings October 8, 2026 20:25

Copilot AI 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.

Comment thread src/hooks/hooks.c
event->queryid = query_desc->plannedstmt->queryId;
event->rows = query_desc->estate->es_processed;
// Match pg_stat_statements row counts across cursor fetches.
event->rows = query_desc->estate->es_total_processed;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

you say that but it builds?

Comment thread src/hooks/hooks.c
Comment on lines +387 to +388
// Match pg_stat_statements row counts across cursor fetches.
event->rows = query_desc->estate->es_total_processed;

This branch has not been deployed

No deployments
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