From: Tomas Vondra Date: Sun, 23 Apr 2017 14:25:37 +0000 (+0200) Subject: Resolve failures in guc regression suite related to SAVEPOINTs X-Git-Tag: XL_10_R1BETA1~350 X-Git-Url: http://git.postgresql.org/gitweb/static/tut_user.html?a=commitdiff_plain;h=73b8b3656dbe9139de89d9427e30961afa5251e7;p=postgres-xl.git Resolve failures in guc regression suite related to SAVEPOINTs The test suite checked GUCs behavior when combined with SAVEPOINTs, but subtransactions are unsupported in Postgres-XL so this caused 'current transaction is aborted' failues. Simply remove parts of the test checking how GUCs interact with subtransactions. Removing the SAVEPOINTs and updating the expected results would be useless, because that exactly matches already existing tests in the suite. There remain several failures in the guc test suite, but those are independent of SAVEPOINTs, and are more about prepared transactions vs. access to temporary objects. --- diff --git a/src/test/regress/expected/guc.out b/src/test/regress/expected/guc.out index 43ac5f5f11..95ab54fcbf 100644 --- a/src/test/regress/expected/guc.out +++ b/src/test/regress/expected/guc.out @@ -132,307 +132,6 @@ SELECT '2006-08-13 12:34:56'::timestamptz; 2006-08-13 12:34:56-07 (1 row) --- Some tests with subtransactions -BEGIN; -SET vacuum_cost_delay TO 70; -SET datestyle = 'MDY'; -SHOW datestyle; - DateStyle ------------ - ISO, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT first_sp; -SET vacuum_cost_delay TO 80; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 80ms -(1 row) - -SET datestyle = 'German, DMY'; -SHOW datestyle; - DateStyle -------------- - German, DMY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 13.08.2006 12:34:56 PDT -(1 row) - -ROLLBACK TO first_sp; -SHOW datestyle; - DateStyle ------------ - ISO, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT second_sp; -SET vacuum_cost_delay TO 90; -SET datestyle = 'SQL, YMD'; -SHOW datestyle; - DateStyle ------------ - SQL, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 08/13/2006 12:34:56 PDT -(1 row) - -SAVEPOINT third_sp; -SET vacuum_cost_delay TO 100; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 100ms -(1 row) - -SET datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -ROLLBACK TO third_sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 90ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - SQL, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz -------------------------- - 08/13/2006 12:34:56 PDT -(1 row) - -ROLLBACK TO second_sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 70ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET LOCAL with Savepoints -BEGIN; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT sp; -SET LOCAL vacuum_cost_delay TO 30; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 30ms -(1 row) - -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -ROLLBACK TO sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - --- SET LOCAL persists through RELEASE (which was not true in 8.0-8.2) -BEGIN; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -SAVEPOINT sp; -SET LOCAL vacuum_cost_delay TO 30; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 30ms -(1 row) - -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -RELEASE SAVEPOINT sp; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 30ms -(1 row) - -SHOW datestyle; - DateStyle ---------------- - Postgres, MDY -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------------- - Sun Aug 13 12:34:56 2006 PDT -(1 row) - -ROLLBACK; -SHOW vacuum_cost_delay; - vacuum_cost_delay -------------------- - 40ms -(1 row) - -SHOW datestyle; - DateStyle ------------ - ISO, YMD -(1 row) - -SELECT '2006-08-13 12:34:56'::timestamptz; - timestamptz ------------------------- - 2006-08-13 12:34:56-07 -(1 row) - -- SET followed by SET LOCAL BEGIN; SET vacuum_cost_delay TO 40; diff --git a/src/test/regress/sql/guc.sql b/src/test/regress/sql/guc.sql index 23e5029780..95ac9cb43b 100644 --- a/src/test/regress/sql/guc.sql +++ b/src/test/regress/sql/guc.sql @@ -40,85 +40,6 @@ SHOW vacuum_cost_delay; SHOW datestyle; SELECT '2006-08-13 12:34:56'::timestamptz; --- Some tests with subtransactions -BEGIN; -SET vacuum_cost_delay TO 70; -SET datestyle = 'MDY'; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -SAVEPOINT first_sp; -SET vacuum_cost_delay TO 80; -SHOW vacuum_cost_delay; -SET datestyle = 'German, DMY'; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK TO first_sp; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -SAVEPOINT second_sp; -SET vacuum_cost_delay TO 90; -SET datestyle = 'SQL, YMD'; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -SAVEPOINT third_sp; -SET vacuum_cost_delay TO 100; -SHOW vacuum_cost_delay; -SET datestyle = 'Postgres, MDY'; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK TO third_sp; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK TO second_sp; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; - --- SET LOCAL with Savepoints -BEGIN; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -SAVEPOINT sp; -SET LOCAL vacuum_cost_delay TO 30; -SHOW vacuum_cost_delay; -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK TO sp; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; - --- SET LOCAL persists through RELEASE (which was not true in 8.0-8.2) -BEGIN; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -SAVEPOINT sp; -SET LOCAL vacuum_cost_delay TO 30; -SHOW vacuum_cost_delay; -SET LOCAL datestyle = 'Postgres, MDY'; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -RELEASE SAVEPOINT sp; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; -ROLLBACK; -SHOW vacuum_cost_delay; -SHOW datestyle; -SELECT '2006-08-13 12:34:56'::timestamptz; - -- SET followed by SET LOCAL BEGIN; SET vacuum_cost_delay TO 40;