Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mise run build:release # Release build
mise run build:16 # Build for PostgreSQL 16
mise run build:17 # Build for PostgreSQL 17
mise run build:18 # Build for PostgreSQL 18
mise run build:19 # Build for PostgreSQL 19
mise run build:all # Build for all PG versions
mise run install # Install the extension
mise run clean # Clean build artifacts
Expand Down Expand Up @@ -105,6 +106,7 @@ mise run test:isolation # Isolation tests (race conditions)
## Version Compatibility

Use `#if PG_VERSION_NUM >= XXXXX` for version-specific code:
- PG 19+: Query instrumentation changes, const JumbleState, updated shared memory APIs, core ComputeConstantLengths
- PG 18+: `execute_once` removed from ExecutorRun
- PG 17+: Unified nesting_level, separate block timing
- PG 15+: JIT instrumentation, temp_blk timing
Expand Down
8 changes: 6 additions & 2 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CFLAGS = "-std=gnu17"
VCPKG_ROOT = "{{config_root}}/third_party/vcpkg"

[tools]
postgres = ["16", "17", "18"]
postgres = ["16", "17", "18", "19"]

[tasks.configure]
run = "cmake -B build --preset default"
Expand Down Expand Up @@ -120,6 +120,10 @@ description = "Build for PostgreSQL 17"
run = "rm -rf build && cmake --preset default -DPG_CONFIG=$(mise where postgres@18)/bin/pg_config && cmake --build build"
description = "Build for PostgreSQL 18"

[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 on lines +123 to +125

[tasks."build:all"]
depends = ["build:16", "build:17", "build:18"]
depends = ["build:16", "build:17", "build:18", "build:19"]
description = "Build for all PostgreSQL versions"
2 changes: 1 addition & 1 deletion scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NC='\033[0m' # No Color

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"
echo " PG_PATH: Path to local PostgreSQL installation"
echo " test_type: regress, tap, isolation, stress, clickhouse, otel, or all (default: all)"
echo " test_filter: (tap only) pattern to match test files, e.g., '021' for t/*021*.pl"
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ static void BuildEventFromQueryDesc(QueryDesc* query_desc, PschEvent* event, int
InitBaseEvent(event, query_start_ts, current_query_is_top_level,
ConvertCmdType(query_desc->operation));
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;
Comment thread
serprex marked this conversation as resolved.

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 on lines +387 to +388
event->cpu_user_time_us = cpu_user_us;
event->cpu_sys_time_us = cpu_sys_us;

Expand Down
Loading