Skip to content

Commit

Permalink
Compatibility with pg15 (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Kukushkin committed Jun 17, 2022
1 parent 5d50028 commit 271c152
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,32 @@ jobs:
matrix:
include:
- postgres-version: '9.3'
os: ubuntu-18.04
os: ubuntu-22.04
- postgres-version: '9.4'
os: ubuntu-20.04
os: ubuntu-18.04
- postgres-version: '9.5'
os: ubuntu-22.04
os: ubuntu-20.04
- postgres-version: '9.6'
os: ubuntu-18.04
os: ubuntu-22.04
- postgres-version: '10'
os: ubuntu-20.04
os: ubuntu-18.04
- postgres-version: '11'
os: ubuntu-22.04
os: ubuntu-20.04
- postgres-version: '12'
os: ubuntu-18.04
os: ubuntu-22.04
- postgres-version: '13'
os: ubuntu-20.04
os: ubuntu-18.04
- postgres-version: '14'
os: ubuntu-20.04
- postgres-version: '15'
os: ubuntu-22.04

steps:
- uses: actions/checkout@v1
- name: Set up packages
run: |
set -e
sudo sh -c "echo \"deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main $PG\" > /etc/apt/sources.list.d/pgdg.list"
sudo sh -c "echo \"deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main $PG\" > /etc/apt/sources.list.d/pgdg.list"
sudo apt-get update
sudo apt-get install -yq --no-install-suggests --no-install-recommends curl postgresql-common lcov libevent-dev pv brotli libbrotli1 libbrotli-dev
# forbid creation of a main cluster when package is installed
Expand Down
5 changes: 5 additions & 0 deletions postgres_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#include "access/heapam.h"
#include "access/xact.h"
#include "access/xlog.h"
#if PG_VERSION_NUM >= 150000
#include "access/xlogrecovery.h"
#endif
#include "executor/spi.h"
#include "catalog/pg_authid.h"
#include "catalog/pg_database.h"
Expand Down Expand Up @@ -992,8 +995,10 @@ static PgBackendType map_backend_type(BackendType type)
return PG_UNKNOWN;
case B_ARCHIVER:
return PG_ARCHIVER;
#if PG_VERSION_NUM < 150000
case B_STATS_COLLECTOR:
return PG_STATS_COLLECTOR;
#endif
case B_LOGGER:
return PG_LOGGER;
#endif
Expand Down

0 comments on commit 271c152

Please sign in to comment.