diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 812c5a1e..003ae00c 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -14,6 +14,8 @@ jobs: - 12 - 11 - 10 + - 9.6 + - 9.5 name: PostgreSQL ${{ matrix.pg }} runs-on: ubuntu-latest diff --git a/doc/pg_repack.rst b/doc/pg_repack.rst index 5da8e2f4..f4b1ab99 100644 --- a/doc/pg_repack.rst +++ b/doc/pg_repack.rst @@ -40,7 +40,9 @@ Requirements ------------ PostgreSQL versions - PostgreSQL 9.4, 9.5, 9.6, 10, 11, 12, 13, 14, 15, 16 + PostgreSQL 9.5, 9.6, 10, 11, 12, 13, 14, 15, 16. + + PostgreSQL 9.4 and before it are not supported. Disks Performing a full-table repack requires free disk space about twice as diff --git a/doc/pg_repack_jp.rst b/doc/pg_repack_jp.rst index 28ff49f1..4c34eb68 100644 --- a/doc/pg_repack_jp.rst +++ b/doc/pg_repack_jp.rst @@ -62,7 +62,9 @@ pg_repackでは再編成する方法として次のものが選択できます ------------ PostgreSQL versions - PostgreSQL 9.4, 9.5, 9.6, 10, 11, 12, 13, 14, 15, 16 + PostgreSQL 9.5, 9.6, 10, 11, 12, 13, 14, 15, 16. + + PostgreSQL 9.4 and before it are not supported. Disks Performing a full-table repack requires free disk space about twice as @@ -75,7 +77,7 @@ pg_repackでは再編成する方法として次のものが選択できます --------- PostgreSQL バージョン - PostgreSQL 9.4, 9.5, 9.6, 10, 11, 12, 13, 14, 15, 16 + PostgreSQL 9.5, 9.6, 10, 11, 12, 13, 14, 15, 16 ディスク テーブル全体の再編成を行うには、対象となるテーブルと付属するインデックスのおよそ2倍のサイズのディスク空き容量が必要です。例えば、テーブルとインデックスを合わせたサイズが1GBの場合、2GBのディスク領域が必要となります。 diff --git a/lib/pg_repack.sql.in b/lib/pg_repack.sql.in index cca6d134..f52d0cfe 100644 --- a/lib/pg_repack.sql.in +++ b/lib/pg_repack.sql.in @@ -277,7 +277,7 @@ CREATE VIEW repack.tables AS 'SELECT repack.create_log_table(' || R.oid || ')' AS create_log, repack.get_create_trigger(R.oid, PK.indexrelid) AS create_trigger, repack.get_enable_trigger(R.oid) as enable_trigger, - 'SELECT repack.create_table($1, $2)' AS create_table, + 'SELECT repack.create_table($1, $2)'::text AS create_table, coalesce(S.spcname, S2.spcname) AS tablespace_orig, 'INSERT INTO repack.table_' || R.oid || ' SELECT ' || repack.get_columns_for_create_as(R.oid) || ' FROM ONLY ' || repack.oid2text(R.oid) AS copy_data, repack.get_alter_col_storage(R.oid) AS alter_col_storage, diff --git a/regress/travis_prepare.sh b/regress/travis_prepare.sh deleted file mode 100755 index cee73cc5..00000000 --- a/regress/travis_prepare.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -set -e -x - -export PACKAGE="$PGVER" -export PGDIR="/usr/lib/postgresql/$PACKAGE" -export CONFDIR="/etc/postgresql/$PACKAGE/main" -export DATADIR="/var/lib/postgresql/$PACKAGE/main" -export PGBIN="$PGDIR/bin" -export PATH="$PGBIN:$PATH" - -# This also stops the server currently running on port 5432 -sudo apt-get remove -y libpq5 - -# Match libpq and server-dev packages -# See https://github.com/reorg/pg_repack/issues/63 -sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main ${PGVER}" > /etc/apt/sources.list.d/pgdg.list' - -# Import the repository signing key: -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - -sudo apt-get update - -# This might be a moving target, but it currently fails. 13 could start -# failing in the future instead. -# Some versions break if this is not specified (9.4 for sure, maybe 9.6) -if [[ "$PGVER" = "9.4" ]]; then - sudo apt-get install -y "libpq5=${PGVER}*" "libpq-dev=${PGVER}*" - sudo apt-mark hold libpq5 -fi - -# missing build dependency by postgresql-server-dev -if [[ "$PGVER" -ge "14" ]]; then - sudo apt-get install -y liblz4-dev -fi - -if ! sudo apt-get install -y \ - postgresql-$PGVER \ - postgresql-client-$PGVER \ - postgresql-server-dev-$PGVER -then - sudo systemctl status postgresql.service -l - exit 1 -fi - -# ensure PostgreSQL is running on 5432 port with proper auth -sudo sed -i \ - 's/\(^local[[:space:]]\+all[[:space:]]\+all[[:space:]]\+\).*/\1trust/' \ - "$CONFDIR/pg_hba.conf" -sudo bash -c "echo 'port=5432' >> $CONFDIR/postgresql.conf" -sudo service postgresql restart $PGVER - -# ensure travis user exists. May be missed if the database was not provided by Travis -userexists=`sudo -u postgres "$PGBIN/psql" -tc "select count(*) from pg_catalog.pg_user where usename='travis';"` -if [ ${userexists} -eq 0 ]; then - sudo -u postgres "$PGBIN/psql" -c "create user travis superuser" -fi - -# Go somewhere else or sudo will fail -cd / - -# Already started because of installing posgresql-$PGVER -# sudo -u postgres "$PGBIN/pg_ctl" -w -l /dev/null -D "$CONFDIR" start -sudo -u postgres mkdir -p /var/lib/postgresql/testts -sudo -u postgres "$PGBIN/psql" \ - -c "create tablespace testts location '/var/lib/postgresql/testts'" - -# Go back to the build dir -cd - diff --git a/regress/travis_test.sh b/regress/travis_test.sh deleted file mode 100755 index 763a705b..00000000 --- a/regress/travis_test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -set -x - -export PG_REGRESS_DIFF_OPTS=-u - -if ! make installcheck; then - cat regress/regression.diffs - exit 1 -fi