Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg_version: ["11", "12", "13", "14", "15", "16", "17", "18"]
from_version: ["2.2", "2.3"]
steps:
- uses: actions/checkout@v6
- name: Remove default PostgreSQL
run: |
sudo apt-get remove -y postgresql-*
- name: Install PostgreSQL
run: |
sudo install -d /usr/share/postgresql-common/pgdg
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install -y "postgresql-${{ matrix.pg_version }}" "postgresql-server-dev-${{ matrix.pg_version }}" "postgresql-${{ matrix.pg_version }}-pglogical"
sudo pg_createcluster -p 5433 ${{ matrix.pg_version }} test
sudo sh -c 'echo "shared_preload_libraries = 'pglogical'\nwal_level = 'logical'" >> /etc/postgresql/${{ matrix.pg_version }}/test/postgresql.conf'
sudo pg_ctlcluster ${{ matrix.pg_version }} test start
RUNNER_USERNAME=$(whoami)
sudo -u postgres psql -p 5433 -c "CREATE USER $RUNNER_USERNAME WITH SUPERUSER"
- name: Run tests
env:
FROMVERSION: ${{ matrix.from_version }}
PGPORT: 5433
run: |
export PATH="/usr/lib/postgresql/${{ matrix.pg_version }}/bin:$PATH"
make
sudo make install
make installcheck || (cat regression.diffs && false)
- name: Upload Results
if: failure()
uses: actions/upload-artifact@v6
with:
name: test-results-${{ matrix.pg_version }}-from-${{ matrix.from_version }}
path: regression.*
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.so
*.o
*.dylib
regression.diffs
regression.out
results
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ DATA = pgl_ddl_deploy--1.0.sql pgl_ddl_deploy--1.0--1.1.sql \
pgl_ddl_deploy--1.7.sql pgl_ddl_deploy--1.7--2.0.sql \
pgl_ddl_deploy--2.0.sql pgl_ddl_deploy--2.0--2.1.sql \
pgl_ddl_deploy--2.1.sql pgl_ddl_deploy--2.1--2.2.sql \
pgl_ddl_deploy--2.2.sql
pgl_ddl_deploy--2.2.sql pgl_ddl_deploy--2.2--2.3.sql \
pgl_ddl_deploy--2.3.sql
MODULES = pgl_ddl_deploy ddl_deparse

REGRESS := 01_create_ext 02_setup 03_add_configs 04_deploy 04_deploy_update \
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ https://innovation.enova.com/pursuing-postgres-ddl-replication/

# <a name="release_notes"></a>Release Notes

### Release 2.3
Summary of changes:
* Support for Postgres 17 & 18

### Release 2.2
Summary of changes:
* Support for Postgres 16
Expand Down
7 changes: 6 additions & 1 deletion ddl_deparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ get_altertable_subcmdinfo(PG_FUNCTION_ARGS)
strtype = "ADD OIDS (and recurse)";
break;
#endif
#if PG_VERSION_NUM >= 120000
#if PG_VERSION_NUM >= 120000 && PG_VERSION_NUM < 180000
case AT_CheckNotNull:
strtype = "CHECK NOT NULL";
break;
Expand All @@ -134,6 +134,11 @@ get_altertable_subcmdinfo(PG_FUNCTION_ARGS)
strtype = "DROP CONSTRAINT (and recurse)";
break;
#endif
#if PG_VERSION_NUM >= 170000
case AT_SetExpression:
strtype = "SET EXPRESSION";
break;
#endif
#if PG_VERSION_NUM >= 160000
case AT_DropExpression:
strtype = "DROP EXPRESSION";
Expand Down
8 changes: 7 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
pgl-ddl-deploy (2.2.1-1) unstable; urgency=medium
pgl-ddl-deploy (2.3.0-1) unstable; urgency=medium

* Support for Postgres 16

-- Jacob Burroughs <jburroughs@instructure.com> Wed, 8 Apr 2026 06:18:15 -0500

pgl-ddl-deploy (2.2.1-1) unstable; urgency=medium

* Fix 2.2 upgrade scripts

Expand Down
2 changes: 1 addition & 1 deletion expected/01_create_ext.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Allow running regression suite with upgrade paths
\set v `echo ${FROMVERSION:-2.2}`
\set v `echo ${FROMVERSION:-2.3}`
SET client_min_messages = warning;
CREATE EXTENSION pglogical;
CREATE EXTENSION pgl_ddl_deploy VERSION :'v';
2 changes: 1 addition & 1 deletion expected/29_create_ext.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Allow running regression suite with upgrade paths
\set v `echo ${FROMVERSION:-2.2}`
\set v `echo ${FROMVERSION:-2.3}`
SET client_min_messages = warning;
CREATE TEMP TABLE v AS
SELECT :'v'::TEXT AS num;
Expand Down
Loading