Reverted changes in Python tests for EPAS/PG YAML files that were added to support Subscription RESQL test cases and adjust streaming values for PG v16+.

pull/9300/head
Anil Sahoo 2025-10-29 15:42:03 +05:30
parent abdcd983f6
commit e4064f637c
20 changed files with 47 additions and 103 deletions

View File

@ -65,7 +65,7 @@ jobs:
run: | run: |
FOR /f "delims=" %%F IN ('python tools\get_sb_package.py "${{ secrets.EDB_SBP_URL }}" "edb_as${{ matrix.pgver }}_dbserver" "windows-x64"') DO SET INSTALLER_EXE=%%F FOR /f "delims=" %%F IN ('python tools\get_sb_package.py "${{ secrets.EDB_SBP_URL }}" "edb_as${{ matrix.pgver }}_dbserver" "windows-x64"') DO SET INSTALLER_EXE=%%F
ECHO Running %INSTALLER_EXE%... ECHO Running %INSTALLER_EXE%...
%INSTALLER_EXE% --prefix C:\EPAS\${{ matrix.pgver }} --datadir C:\EPAS\${{ matrix.pgver }}\data --serverport 59${{ matrix.pgver }} --superpassword enterprisedb --create_samples no --install_runtimes 0 --mode unattended --unattendedmodeui none --disable-components stackbuilderplus${{ matrix.pgver < 15 && ',pgadmin4' || '' }} %INSTALLER_EXE% --prefix C:\EPAS\${{ matrix.pgver }} --datadir C:\EPAS\${{ matrix.pgver }}\data --serverport 58${{ matrix.pgver }} --superpassword enterprisedb --create_samples no --install_runtimes 0 --mode unattended --unattendedmodeui none --disable-components stackbuilderplus${{ matrix.pgver < 15 && ',pgadmin4' || '' }}
choco install -y mitkerberos choco install -y mitkerberos
@ -105,38 +105,23 @@ jobs:
run: | run: |
# Note: we use a custom port for PostgreSQL as the runner may already have a version of PostgreSQL installed # Note: we use a custom port for PostgreSQL as the runner may already have a version of PostgreSQL installed
sudo su -c "echo local all all trust > /etc/edb-as/${{ matrix.pgver }}/main/pg_hba.conf" sudo su -c "echo local all all trust > /etc/edb-as/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host all all 127.0.0.1/32 trust >> /etc/edb-as/${{ matrix.pgver }}/main/pg_hba.conf" sudo sed -i "s/port = 544[0-9]/port = 58${{ matrix.pgver }}/g" /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf
sudo su -c "echo host all all ::1/128 trust >> /etc/edb-as/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host replication postgres 127.0.0.1/32 trust >> /etc/edb-as/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host replication postgres ::1/128 trust >> /etc/edb-as/${{ matrix.pgver }}/main/pg_hba.conf"
sudo sed -i "s/port = 544[0-9]/port = 59${{ matrix.pgver }}/g" /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf
sudo sed -i "s/shared_preload_libraries = '/shared_preload_libraries = '\$libdir\/plugin_debugger,/g" /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf sudo sed -i "s/shared_preload_libraries = '/shared_preload_libraries = '\$libdir\/plugin_debugger,/g" /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf
echo "wal_level = logical" | sudo tee -a /etc/edb-as/${{ matrix.pgver }}/main/postgresql.conf
sudo su - enterprisedb -c "mkdir -p /var/run/edb-as/${{ matrix.pgver }}-main.epas_stat_tmp" sudo su - enterprisedb -c "mkdir -p /var/run/edb-as/${{ matrix.pgver }}-main.epas_stat_tmp"
sudo systemctl restart edb-as@${{ matrix.pgver }}-main sudo systemctl restart edb-as@${{ matrix.pgver }}-main
until sudo runuser -l enterprisedb -c "/usr/lib/edb-as/${{ matrix.pgver }}/bin/pg_isready -p 59${{ matrix.pgver }}" 2>/dev/null; do until sudo runuser -l enterprisedb -c "/usr/lib/edb-as/${{ matrix.pgver }}/bin/pg_isready -p 58${{ matrix.pgver }}" 2>/dev/null; do
>&2 echo "EPAS is unavailable - sleeping for 2 seconds" >&2 echo "EPAS is unavailable - sleeping for 2 seconds"
sleep 2 sleep 2
done done
- name: Start PostgreSQL on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo host replication postgres 127.0.0.1/32 trust >> "C:\EPAS\${{ matrix.pgver }}\data\pg_hba.conf"
echo host replication postgres ::1/128 trust >> "C:\EPAS\${{ matrix.pgver }}\data\pg_hba.conf"
echo wal_level = logical >> "C:\EPAS\${{ matrix.pgver }}\data\postgresql.conf"
net stop edb-as-${{ matrix.pgver }}
net start edb-as-${{ matrix.pgver }}
shell: cmd
- name: Create pgagent extension on Linux - name: Create pgagent extension on Linux
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver <= 16 }} if: ${{ matrix.os == 'ubuntu-22.04' && matrix.pgver <= 16 }}
run: psql -U enterprisedb -d postgres -p 59${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS pgagent;' run: psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS pgagent;'
- name: Create postgis extension on Linux - name: Create postgis extension on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }} if: ${{ matrix.os == 'ubuntu-22.04' }}
run: psql -U enterprisedb -d postgres -p 59${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS postgis;' run: psql -U enterprisedb -d postgres -p 58${{ matrix.pgver }} -c 'CREATE EXTENSION IF NOT EXISTS postgis;'
- name: Install Python dependencies on Linux - name: Install Python dependencies on Linux
if: ${{ matrix.os == 'ubuntu-22.04' }} if: ${{ matrix.os == 'ubuntu-22.04' }}
@ -206,7 +191,7 @@ jobs:
"db_username": "enterprisedb", "db_username": "enterprisedb",
"host": "/var/run/edb-as", "host": "/var/run/edb-as",
"db_password": "", "db_password": "",
"db_port": 59${{ matrix.pgver }}, "db_port": 58${{ matrix.pgver }},
"maintenance_db": "postgres", "maintenance_db": "postgres",
"sslmode": "prefer", "sslmode": "prefer",
"tablespace_path": "/var/lib/edb-as/tablespaces/${{ matrix.pgver }}", "tablespace_path": "/var/lib/edb-as/tablespaces/${{ matrix.pgver }}",
@ -280,7 +265,7 @@ jobs:
@echo. "db_username": "enterprisedb", @echo. "db_username": "enterprisedb",
@echo. "host": "127.0.0.1", @echo. "host": "127.0.0.1",
@echo. "db_password": "enterprisedb", @echo. "db_password": "enterprisedb",
@echo. "db_port": 59${{ matrix.pgver }}, @echo. "db_port": 58${{ matrix.pgver }},
@echo. "maintenance_db": "postgres", @echo. "maintenance_db": "postgres",
@echo. "sslmode": "prefer", @echo. "sslmode": "prefer",
@echo. "tablespace_path": "C:\\EPAS\\${{ matrix.pgver }}\\tablespaces", @echo. "tablespace_path": "C:\\EPAS\\${{ matrix.pgver }}\\tablespaces",

View File

@ -116,13 +116,8 @@ jobs:
if: ${{ matrix.os == 'ubuntu-22.04' }} if: ${{ matrix.os == 'ubuntu-22.04' }}
run: | run: |
sudo su -c "echo local all all trust > /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf" sudo su -c "echo local all all trust > /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host all all 127.0.0.1/32 trust >> /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host all all ::1/128 trust >> /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host replication postgres 127.0.0.1/32 trust >> /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf"
sudo su -c "echo host replication postgres ::1/128 trust >> /etc/postgresql/${{ matrix.pgver }}/main/pg_hba.conf"
sudo sed -i "s/port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf sudo sed -i "s/port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf
sudo sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = '\$libdir\/plugin_debugger'/g" /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf sudo sed -i "s/#shared_preload_libraries = ''/shared_preload_libraries = '\$libdir\/plugin_debugger'/g" /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf
echo "wal_level = logical" | sudo tee -a /etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf
sudo su - postgres -c "/usr/lib/postgresql/${{ matrix.pgver }}/bin/postgres -D /var/lib/postgresql/${{ matrix.pgver }}/main -c config_file=/etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf &" sudo su - postgres -c "/usr/lib/postgresql/${{ matrix.pgver }}/bin/postgres -D /var/lib/postgresql/${{ matrix.pgver }}/main -c config_file=/etc/postgresql/${{ matrix.pgver }}/main/postgresql.conf &"
until sudo runuser -l postgres -c "pg_isready -p 59${{ matrix.pgver }}" 2>/dev/null; do until sudo runuser -l postgres -c "pg_isready -p 59${{ matrix.pgver }}" 2>/dev/null; do
@ -138,12 +133,7 @@ jobs:
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
run: | run: |
echo local all all trust > /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf echo local all all trust > /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
echo 'host all all 127.0.0.1/32 trust' >> /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
echo 'host all all ::1/128 trust' >> /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
echo 'host replication postgres 127.0.0.1/32 trust' >> /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
echo 'host replication postgres ::1/128 trust' >> /opt/homebrew/var/postgresql@${{ matrix.pgver }}/pg_hba.conf
sed -i '' "s/#port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /opt/homebrew/var/postgresql@${{ matrix.pgver }}/postgresql.conf sed -i '' "s/#port = 543[0-9]/port = 59${{ matrix.pgver }}/g" /opt/homebrew/var/postgresql@${{ matrix.pgver }}/postgresql.conf
echo "wal_level = logical" >> /opt/homebrew/var/postgresql@${{ matrix.pgver }}/postgresql.conf
brew services restart postgresql@${{ matrix.pgver }} brew services restart postgresql@${{ matrix.pgver }}
until /opt/homebrew/opt/postgresql@${{ matrix.pgver }}/bin/pg_isready -p 59${{ matrix.pgver }} 2>/dev/null; do until /opt/homebrew/opt/postgresql@${{ matrix.pgver }}/bin/pg_isready -p 59${{ matrix.pgver }} 2>/dev/null; do
@ -153,16 +143,6 @@ jobs:
psql postgres -p 59${{ matrix.pgver }} -c 'CREATE ROLE postgres SUPERUSER LOGIN;' psql postgres -p 59${{ matrix.pgver }} -c 'CREATE ROLE postgres SUPERUSER LOGIN;'
- name: Start PostgreSQL on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
echo host replication postgres 127.0.0.1/32 trust >> "C:\PostgreSQL\${{ matrix.pgver }}\data\pg_hba.conf"
echo host replication postgres ::1/128 trust >> "C:\PostgreSQL\${{ matrix.pgver }}\data\pg_hba.conf"
echo wal_level = logical >> "C:\PostgreSQL\${{ matrix.pgver }}\data\postgresql.conf"
net stop postgresql-x64-${{ matrix.pgver }}
net start postgresql-x64-${{ matrix.pgver }}
shell: cmd
- name: Install Python dependencies on Linux and macOS - name: Install Python dependencies on Linux and macOS
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-22.04' }} if: ${{ matrix.os == 'macos-latest' || matrix.os == 'ubuntu-22.04' }}
run: make install-python-testing run: make install-python-testing

View File

@ -184,8 +184,8 @@ class SubscriptionView(PGChildNodeView, SchemaDiffObjectCompare):
# This mapping will be used PostgresSQL 16 above # This mapping will be used PostgresSQL 16 above
streaming_mapping = { streaming_mapping = {
'p': 'parallel', 'p': 'parallel',
't': True, 't': 'on',
'f': False 'f': 'off'
} }
two_phase_mapping = { two_phase_mapping = {
'p': True, 'p': True,

View File

@ -11,6 +11,12 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators'; import { isEmptyString } from 'sources/validators';
import _ from 'lodash'; import _ from 'lodash';
function getDefaultStreaming(version) {
if (version >= 180000) return 'parallel';
if (version >= 160000) return 'off';
return false;
}
export default class SubscriptionSchema extends BaseUISchema{ export default class SubscriptionSchema extends BaseUISchema{
constructor(fieldOptions={}, node_info={}, initValues={}) { constructor(fieldOptions={}, node_info={}, initValues={}) {
super({ super({
@ -26,7 +32,7 @@ export default class SubscriptionSchema extends BaseUISchema{
binary:false, binary:false,
two_phase:false, two_phase:false,
disable_on_error:false, disable_on_error:false,
streaming: (node_info?.node_info?.version >= 180000) ? 'parallel' : false, streaming: getDefaultStreaming(node_info?.node_info?.version),
password_required:true, password_required:true,
run_as_owner:false, run_as_owner:false,
origin:'any', origin:'any',
@ -386,24 +392,19 @@ export default class SubscriptionSchema extends BaseUISchema{
cell: 'text', cell: 'text',
group: gettext('With'), mode: ['create', 'edit', 'properties'], group: gettext('With'), mode: ['create', 'edit', 'properties'],
type: ()=>{ type: ()=>{
let options = [ let options;
{
'label': gettext('On'),
value: true,
},
{
'label': gettext('Off'),
value: false,
}
];
if (obj.version >= 160000) { if (obj.version >= 160000) {
options.push({ options = [
'label': gettext('Parallel'), { label: gettext('On'), value: 'on' },
value: 'parallel', { label: gettext('Off'), value: 'off' },
}); { label: gettext('Parallel'), value: 'parallel' },
];
} else {
options = [
{ label: gettext('On'), value: true },
{ label: gettext('Off'), value: false },
];
} }
return { return {
type: 'toggle', type: 'toggle',
options: options, options: options,

View File

@ -5,4 +5,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_pub PUBLICATION test_pub
WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'off', binary = false, streaming = 'False', two_phase = true, disable_on_error = false, run_as_owner = true, password_required = true, origin = 'none'); WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'off', binary = false, streaming = 'parallel', two_phase = true, disable_on_error = false, run_as_owner = true, password_required = true, origin = 'none');

View File

@ -1,2 +1,2 @@
ALTER SUBSCRIPTION test_create_subscription ALTER SUBSCRIPTION test_create_subscription
SET (synchronous_commit = 'off', binary = false, streaming = 'False', disable_on_error = false, origin = 'none'); SET (synchronous_commit = 'off', binary = false, streaming = 'parallel', disable_on_error = false, origin = 'none');

View File

@ -5,4 +5,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_pub PUBLICATION test_pub
WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any'); WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any');

View File

@ -1,4 +1,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer'
PUBLICATION test_pub PUBLICATION test_pub
WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any'); WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any');

View File

@ -23,7 +23,7 @@
"password": "edb", "password": "edb",
"sync": "remote_apply", "sync": "remote_apply",
"binary": true, "binary": true,
"streaming": true, "streaming": "on",
"disable_on_error": true, "disable_on_error": true,
"two_phase": true, "two_phase": true,
"password_required": true, "password_required": true,
@ -44,7 +44,7 @@
"data": { "data": {
"sync": "off", "sync": "off",
"binary": false, "binary": false,
"streaming": false, "streaming": "parallel",
"disable_on_error": false, "disable_on_error": false,
"origin": "none" "origin": "none"
}, },

View File

@ -1,8 +0,0 @@
-- Subscription: test_create_subscription
-- DROP SUBSCRIPTION IF EXISTS test_create_subscription;
CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5917 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_publication
WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = true);

View File

@ -1,2 +0,0 @@
ALTER SUBSCRIPTION test_create_subscription
SET (failover = true);

View File

@ -3,6 +3,6 @@
-- DROP SUBSCRIPTION IF EXISTS test_create_subscription; -- DROP SUBSCRIPTION IF EXISTS test_create_subscription;
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5917 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = true); WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -3,6 +3,6 @@
-- DROP SUBSCRIPTION IF EXISTS test_create_subscription; -- DROP SUBSCRIPTION IF EXISTS test_create_subscription;
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5917 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false); WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -1,4 +1,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5917 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = true, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false); WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -61,7 +61,7 @@
"name": "test_create_subscription", "name": "test_create_subscription",
"subowner": "postgres", "subowner": "postgres",
"host": "localhost", "host": "localhost",
"port": 5917, "port": 5434,
"db": "postgres", "db": "postgres",
"username": "postgres", "username": "postgres",
"password": "postgres", "password": "postgres",
@ -71,10 +71,10 @@
"copy_data": false, "copy_data": false,
"create_slot": false, "create_slot": false,
"enabled": false, "enabled": false,
"connect": true, "connect": false,
"slot_name": "test_create_subscription", "slot_name": "test_create_subscription",
"sync": "remote_apply", "sync": "remote_apply",
"streaming": true, "streaming": "on",
"binary": true, "binary": true,
"two_phase": true, "two_phase": true,
"disable_on_error": true, "disable_on_error": true,
@ -87,18 +87,6 @@
"expected_sql_file": "create_subscription.sql", "expected_sql_file": "create_subscription.sql",
"expected_msql_file": "create_subscription_msql.sql" "expected_msql_file": "create_subscription_msql.sql"
}, },
{
"type": "alter",
"name": "Alter failover parameter of subscription",
"endpoint": "NODE-subscription.obj_id",
"sql_endpoint": "NODE-subscription.sql_id",
"msql_endpoint": "NODE-subscription.msql_id",
"data": {
"failover": true
},
"expected_sql_file": "alter_failover_parameter.sql",
"expected_msql_file": "alter_failover_parameter_msql.sql"
},
{ {
"type": "alter", "type": "alter",
"name": "Alter slot_name parameter of subscription", "name": "Alter slot_name parameter of subscription",

View File

@ -5,4 +5,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false); WITH (connect = false, enabled = false, create_slot = false, slot_name = None, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -5,4 +5,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false); WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = true, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -5,4 +5,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = false, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false); WITH (connect = false, enabled = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = false, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -1,4 +1,4 @@
CREATE SUBSCRIPTION test_create_subscription CREATE SUBSCRIPTION test_create_subscription
CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer' CONNECTION 'host=localhost port=5434 user=postgres dbname=postgres connect_timeout=10 password=xxxxxx sslmode=prefer'
PUBLICATION test_publication PUBLICATION test_publication
WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'True', two_phase = false, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false); WITH (connect = false, enabled = false, copy_data = false, create_slot = false, slot_name = test_create_subscription, synchronous_commit = 'remote_apply', binary = true, streaming = 'on', two_phase = false, disable_on_error = true, run_as_owner = true, password_required = true, origin = 'any', failover = false);

View File

@ -24,7 +24,7 @@
"connect": false, "connect": false,
"slot_name": "test_create_subscription", "slot_name": "test_create_subscription",
"sync": "remote_apply", "sync": "remote_apply",
"streaming": true, "streaming": "on",
"binary": true, "binary": true,
"two_phase": false, "two_phase": false,
"disable_on_error": true, "disable_on_error": true,