From b5c0d95f7605d3612897b07bbc9c26d44f924ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daymel=20Bonne=20Sol=C3=ADs?= <7658145+dbonne@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:03:13 -0500 Subject: [PATCH 1/2] Removed regression tests for postgres 10 and 11 --- .github/workflows/regression.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 812c5a1e..b7055104 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -12,14 +12,11 @@ jobs: - 14 - 13 - 12 - - 11 - - 10 name: PostgreSQL ${{ matrix.pg }} runs-on: ubuntu-latest container: pgxn/pgxn-tools steps: - - name: Start PostgreSQL ${{ matrix.pg }} run: pg-start ${{ matrix.pg }} @@ -32,12 +29,6 @@ jobs: - name: Put pg_repack on PATH run: echo "$PWD/bin" >> $GITHUB_PATH - - name: Create testts directory - run: sudo -u postgres mkdir /tmp/testts - - - name: Create testts tablespace - run: sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'" - - name: Test on PostgreSQL ${{ matrix.pg }} run: pg-build-test From fa132dbfa17c27ca8fd25e4b722eace7e57ff9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daymel=20Bonne=20Sol=C3=ADs?= <7658145+dbonne@users.noreply.github.com> Date: Wed, 22 Nov 2023 22:08:37 -0500 Subject: [PATCH 2/2] The execution of regression tests is simplified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * `allow_in_place_tablespaces` is used to fix running regression tests locally Signed-off-by: Daymel Bonne SolĂ­s <7658145+dbonne@users.noreply.github.com> --- regress/expected/tablespace.out | 32 +++++++++++++++++--------------- regress/sql/tablespace.sql | 2 ++ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/regress/expected/tablespace.out b/regress/expected/tablespace.out index 11c7e106..9d6afaea 100644 --- a/regress/expected/tablespace.out +++ b/regress/expected/tablespace.out @@ -4,6 +4,8 @@ SET client_min_messages = warning; -- -- Note: in order to pass this test you must create a tablespace called 'testts' -- +SET allow_in_place_tablespaces = true; +CREATE TABLESPACE testts LOCATION ''; SELECT spcname FROM pg_tablespace WHERE spcname = 'testts'; spcname --------- @@ -23,11 +25,11 @@ SELECT regexp_replace( '_[0-9]+', '_OID', 'g') FROM pg_index i join pg_class c ON c.oid = indexrelid WHERE indrelid = 'testts1'::regclass ORDER BY relname; - regexp_replace ----------------------------------------------------------------------------------------------------------- - CREATE INDEX index_OID ON repack.table_OID USING btree (id) TABLESPACE pg_default WHERE (id > 0) - CREATE UNIQUE INDEX index_OID ON repack.table_OID USING btree (id) TABLESPACE pg_default - CREATE INDEX index_OID ON repack.table_OID USING btree (id) WITH (fillfactor='80') TABLESPACE pg_default + regexp_replace +------------------------------------------------------------------------------------ + CREATE INDEX index_OID ON repack.table_OID USING btree (id) WHERE (id > 0) + CREATE UNIQUE INDEX index_OID ON repack.table_OID USING btree (id) + CREATE INDEX index_OID ON repack.table_OID USING btree (id) WITH (fillfactor='80') (3 rows) SELECT regexp_replace( @@ -47,11 +49,11 @@ SELECT regexp_replace( '_[0-9]+', '_OID', 'g') FROM pg_index i join pg_class c ON c.oid = indexrelid WHERE indrelid = 'testts1'::regclass ORDER BY relname; - regexp_replace --------------------------------------------------------------------------------------------------------------- - CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE pg_default WHERE (id > 0) - CREATE UNIQUE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE pg_default - CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) WITH (fillfactor='80') TABLESPACE pg_default + regexp_replace +----------------------------------------------------------------------------------------------- + CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) WHERE (id > 0) + CREATE UNIQUE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) + CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) WITH (fillfactor='80') (3 rows) SELECT regexp_replace( @@ -59,11 +61,11 @@ SELECT regexp_replace( '_[0-9]+', '_OID', 'g') FROM pg_index i join pg_class c ON c.oid = indexrelid WHERE indrelid = 'testts1'::regclass ORDER BY relname; - regexp_replace -------------------------------------------------------------------------------------------------------- - CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE foo WHERE (id > 0) - CREATE UNIQUE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) TABLESPACE foo - CREATE INDEX CONCURRENTLY index_OID ON testts1 USING btree (id) WITH (fillfactor='80') TABLESPACE foo + regexp_replace +-------------------------------------------------------------------------------------------------------------- + CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) TABLESPACE foo WHERE (id > 0) + CREATE UNIQUE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) TABLESPACE foo + CREATE INDEX CONCURRENTLY index_OID ON public.testts1 USING btree (id) WITH (fillfactor='80') TABLESPACE foo (3 rows) -- Test that a tablespace is quoted as an identifier diff --git a/regress/sql/tablespace.sql b/regress/sql/tablespace.sql index 78790d87..ca88a609 100644 --- a/regress/sql/tablespace.sql +++ b/regress/sql/tablespace.sql @@ -5,6 +5,8 @@ SET client_min_messages = warning; -- -- Note: in order to pass this test you must create a tablespace called 'testts' -- +SET allow_in_place_tablespaces = true; +CREATE TABLESPACE testts LOCATION ''; SELECT spcname FROM pg_tablespace WHERE spcname = 'testts'; -- If the query above failed you must create the 'testts' tablespace;