Skip to content

Commit

Permalink
Fix powa_stat_archiver_src for pg 10-
Browse files Browse the repository at this point in the history
And also run ci for pg 9.6 to test this code path.  Surprisingly the ci fails
for pg9.6 for any attemp immeditely after a successful pg_ctl start, so I'm
adding a 1 second sleep, which seems to be reliable enough.
  • Loading branch information
rjuju committed Jul 19, 2024
1 parent cbf20af commit 170105c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
strategy:
matrix:
postgres_major_version: [
"9.6",
"10",
"11",
"12",
Expand Down Expand Up @@ -79,6 +80,8 @@ jobs:
pg_ctl -D $DATADIR initdb
echo "shared_preload_libraries = 'pg_stat_statements'" >> $DATADIR/postgresql.conf
pg_ctl -D $DATADIR -l $LOGFILE start || cat $LOGFILE
# a sleep is required for pg9.6 (at least)
sleep 1
psql -c 'select 1 as ok' postgres
- name: Build and install powa-archivist for postgres ${{ matrix.postgres_major_version }}
Expand Down
2 changes: 1 addition & 1 deletion powa--5.0.0dev.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4448,7 +4448,7 @@ BEGIN
v_current_wal := NULL;
ELSE
IF current_setting('server_version_num')::int < 100000 THEN
v_current_wal := pg_walfile_name(pg_last_wal_receive_lsn());
v_current_wal := pg_xlogfile_name(pg_current_xlog_location());
ELSE
v_current_wal := pg_walfile_name(pg_current_wal_lsn());
END IF;
Expand Down

0 comments on commit 170105c

Please sign in to comment.