1
1
mirror of https://github.com/yandex/pgmigrate.git synced 2024-07-14 07:50:34 +03:00
pgmigrate/run_test.sh
secwall 1dcf5cb5aa Use application_name instead of backend pid for conflict termination.
Defect was discovered by Alexander Artemenko (@svetlyak40wt).
If pgmigrate is used with pgbouncer in transaction pooling mode
conflict termination will fail to correctly find pgmigrate connections.
In order to fix this we pass random application_name in dsn for each
connection. We use LIKE-query because connection pooler could append host/port
to original value.
2019-11-02 02:31:24 +03:00

13 lines
344 B
Bash
Executable File

#!/bin/sh
set -e
chown -R postgres:postgres /dist
mkdir -p /var/log/postgresql
chown postgres:postgres /var/log/postgresql
sudo -u postgres /usr/lib/postgresql/${PG_MAJOR}/bin/pg_ctl -D \
/etc/postgresql/${PG_MAJOR}/main -l \
/var/log/postgresql/postgresql-${PG_MAJOR}-main.log start
cd /dist
sudo -u postgres -i tox -c /dist/tox.ini