Skip to content

Commit

Permalink
Fix compute_logical_snapshot_files for v14
Browse files Browse the repository at this point in the history
The function, pg_ls_logicalsnapdir(), was added in version 15.

Signed-off-by: Tristan Partin <[email protected]>
  • Loading branch information
tristan957 committed Sep 25, 2024
1 parent 8ace9ea commit 684e924
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compute/etc/neon_collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ metrics:
-- Postgres creates temporary snapshot files of the form %X-%X.snap.%d.tmp. These
-- temporary snapshot files are renamed to the actual snapshot files after they are
-- completely built. We only WAL-log the completely built snapshot files.
(SELECT COUNT(*) FROM pg_ls_logicalsnapdir() WHERE name LIKE '%.snap') AS num_logical_snapshot_files;
(SELECT COUNT(*) FROM pg_ls_dir('pg_logical/snapshots') AS name WHERE name LIKE '%.snap') AS num_logical_snapshot_files;
# In all the below metrics, we cast LSNs to floats because Prometheus only supports floats.
# It's probably fine because float64 can store integers from -2^53 to +2^53 exactly.
Expand Down Expand Up @@ -244,4 +244,3 @@ metrics:
SELECT slot_name,
CASE WHEN wal_status = 'lost' THEN 1 ELSE 0 END AS wal_is_lost
FROM pg_replication_slots;

1 comment on commit 684e924

@github-actions
Copy link

Choose a reason for hiding this comment

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

5013 tests run: 4848 passed, 1 failed, 164 skipped (full report)


Failures on Postgres 15

# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_ingesting_large_batches_of_images[release-pg15]"
Flaky tests (5)

Postgres 17

Postgres 16

Postgres 15

  • test_ondemand_wal_download_in_replication_slot_funcs: release-x86-64

Postgres 14

Test coverage report is not available

The comment gets automatically updated with the latest test results
684e924 at 2024-09-25T22:13:33.496Z :recycle:

Please sign in to comment.