Merge pull request #363 from jackc/fix-travis-pg-10
Use dpkg to compare postgresql versions for travis
This commit is contained in:
@@ -18,9 +18,11 @@ then
|
|||||||
echo "host replication pgx_replication 127.0.0.1/32 md5" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
echo "host replication pgx_replication 127.0.0.1/32 md5" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
||||||
echo "host pgx_test pgx_replication 127.0.0.1/32 md5" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
echo "host pgx_test pgx_replication 127.0.0.1/32 md5" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
||||||
sudo chmod 777 /etc/postgresql/$PGVERSION/main/postgresql.conf
|
sudo chmod 777 /etc/postgresql/$PGVERSION/main/postgresql.conf
|
||||||
[[ $PGVERSION < 9.6 ]] || echo "wal_level='logical'" >> /etc/postgresql/$PGVERSION/main/postgresql.conf
|
if $(dpkg --compare-versions $PGVERSION ge 9.6) ; then
|
||||||
[[ $PGVERSION < 9.6 ]] || echo "max_wal_senders=5" >> /etc/postgresql/$PGVERSION/main/postgresql.conf
|
echo "wal_level='logical'" >> /etc/postgresql/$PGVERSION/main/postgresql.conf
|
||||||
[[ $PGVERSION < 9.6 ]] || echo "max_replication_slots=5" >> /etc/postgresql/$PGVERSION/main/postgresql.conf
|
echo "max_wal_senders=5" >> /etc/postgresql/$PGVERSION/main/postgresql.conf
|
||||||
|
echo "max_replication_slots=5" >> /etc/postgresql/$PGVERSION/main/postgresql.conf
|
||||||
|
fi
|
||||||
sudo /etc/init.d/postgresql restart
|
sudo /etc/init.d/postgresql restart
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user