From 9651502161d787f6ee0e2a2ce954c48ae9d436bc Mon Sep 17 00:00:00 2001 From: Sofia Kopikova Date: Tue, 2 Dec 2025 13:42:22 +0300 Subject: [PATCH 1/3] Fix errors for PostgreSQL 18+ in ptrack 001_basic test --- Makefile | 1 + t/001_basic.pl | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 499067a..9d4b451 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ ifdef USE_PGXS PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else +subdir = contrib/ptrack top_builddir = ../.. # Makefile.global is a build artifact and initially may not be available ifneq ($(wildcard $(top_builddir)/src/Makefile.global), ) diff --git a/t/001_basic.pl b/t/001_basic.pl index 369a59c..90ac3ac 100644 --- a/t/001_basic.pl +++ b/t/001_basic.pl @@ -117,9 +117,9 @@ BEGIN # Remember ptrack init_lsn my $init_lsn = $node->safe_psql("postgres", "SELECT ptrack_init_lsn()"); -unlike( +like( $init_lsn, - qr/0\/0/, + qr/0\/[0-9][0-9]+/, 'ptrack init LSN should not be 0/0 after CHECKPOINT'); # Ptrack map should survive crash @@ -161,9 +161,9 @@ BEGIN $node->safe_psql("postgres", "CHECKPOINT"); $res_stdout = $node->safe_psql("postgres", "SELECT ptrack_init_lsn()"); -unlike( +like( $res_stdout, - qr/0\/0/, + qr/0\/[0-9][0-9]+/, 'ptrack init LSN should not be 0/0 after CHECKPOINT'); ok($res_stdout ne $init_lsn, 'ptrack init_lsn should not be the same after map resize'); $res_stdout = $node->safe_psql("postgres", "SELECT ptrack_get_pagemapset('$flush_lsn')"); From 3f97e1e7139b14643106e116d05aefa1c358e83d Mon Sep 17 00:00:00 2001 From: Oleg Gurev Date: Tue, 2 Dec 2025 14:52:21 +0300 Subject: [PATCH 2/3] Update of GitHub Actions pipeline --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f05773a..9d5738f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,12 +14,9 @@ jobs: Test: strategy: matrix: - # pg_version: [15] - pg_version: [11, 12, 13, 14, 15] + pg_version: [13, 14, 15, 16, 17, 18] os: [ubuntu-22.04] - # tests: [tap] tests: [tap, python] - # test_mode: [normal, legacy, paranoia] test_mode: [normal, paranoia] exclude: - tests: tap @@ -56,6 +53,11 @@ jobs: - name: Apply ptrack patches run: make patch top_builddir=../postgres working-directory: ptrack + - name: Apply probackup patch + if: ${{ matrix.pg_version == '18' }} + run: git apply ../pg_probackup/patches/REL_18_STABLE_pg_probackup.patch + working-directory: postgres + shell: bash {0} - name: Install Postgres run: | make install-postgres top_builddir=$GITHUB_WORKSPACE/postgres prefix=$HOME/pgsql && From 1afe067d387a6ff5069fa73f9e352b2d786098fa Mon Sep 17 00:00:00 2001 From: Sofia Kopikova Date: Tue, 2 Dec 2025 15:34:00 +0300 Subject: [PATCH 3/3] Fix LSN formatting in expected test message --- t/001_basic.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/001_basic.pl b/t/001_basic.pl index 90ac3ac..907515e 100644 --- a/t/001_basic.pl +++ b/t/001_basic.pl @@ -119,7 +119,7 @@ BEGIN my $init_lsn = $node->safe_psql("postgres", "SELECT ptrack_init_lsn()"); like( $init_lsn, - qr/0\/[0-9][0-9]+/, + qr/0\/[0-9A-F][0-9A-F]+/, 'ptrack init LSN should not be 0/0 after CHECKPOINT'); # Ptrack map should survive crash @@ -163,7 +163,7 @@ BEGIN $res_stdout = $node->safe_psql("postgres", "SELECT ptrack_init_lsn()"); like( $res_stdout, - qr/0\/[0-9][0-9]+/, + qr/0\/[0-9A-F][0-9A-F]+/, 'ptrack init LSN should not be 0/0 after CHECKPOINT'); ok($res_stdout ne $init_lsn, 'ptrack init_lsn should not be the same after map resize'); $res_stdout = $node->safe_psql("postgres", "SELECT ptrack_get_pagemapset('$flush_lsn')");