diff --git a/.circleci/config.yml b/.circleci/config.yml index 07953f2ab..053d3d76b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,16 +6,16 @@ orbs: parameters: image_suffix: type: string - default: '-vb4dd087' + default: '-v643b0b7' pg13_version: type: string - default: '13.4' + default: '13.8' pg14_version: type: string - default: '14.0' + default: '14.5' upgrade_pg_versions: type: string - default: '13.4-14.0-15beta3' + default: '13.8-14.5-15beta3' style_checker_tools_version: type: string default: '0.8.18' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7253c92ed..6c54e9d6c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,6 +13,17 @@ why we ask this as well as instructions for how to proceed, see the ### Getting and building +[PostgreSQL documentation](https://www.postgresql.org/support/versioning/) has a +section on upgrade policy. + + We always recommend that all users run the latest available minor release [for PostgreSQL] for whatever major version is in use. + +We expect Citus users to honor this recommendation and use latest available +PostgreSQL minor release. Failure to do so may result in failures in our test +suite. There are some known improvements in PG test architecture such as +[this commit](https://github.com/postgres/postgres/commit/3f323956128ff8589ce4d3a14e8b950837831803) +that are missing in earlier minor versions. + #### Mac 1. Install Xcode diff --git a/src/test/regress/expected/isolation_ref2ref_foreign_keys.out b/src/test/regress/expected/isolation_ref2ref_foreign_keys.out index 246d45aba..e3fec3d04 100644 --- a/src/test/regress/expected/isolation_ref2ref_foreign_keys.out +++ b/src/test/regress/expected/isolation_ref2ref_foreign_keys.out @@ -11,6 +11,9 @@ step s1-begin: BEGIN; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -25,10 +28,10 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_1 SET id = 2 WHERE id = 1; - 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_1 SET id = 2 WHERE id = 1; + 0|8429800| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_1 SET id = 2 WHERE id = 1; + 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_1 SET id = 2 WHERE id = 1; (2 rows) step s1-rollback: @@ -38,6 +41,9 @@ step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -65,6 +71,9 @@ step s2-delete-table-1: DELETE FROM ref_table_1 WHERE id = 1; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -79,16 +88,19 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_1 WHERE id = 1; - 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_1 WHERE id = 1; + 0|8429800| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_1 WHERE id = 1; + 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_1 WHERE id = 1; (2 rows) step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -116,6 +128,9 @@ step s2-update-table-2: UPDATE ref_table_2 SET id = 2 WHERE id = 1; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -130,17 +145,20 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_2 SET id = 2 WHERE id = 1; - 0|8429801| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_2 SET id = 2 WHERE id = 1; - 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_2 SET id = 2 WHERE id = 1; + 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_2 SET id = 2 WHERE id = 1; + 0|8429801| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_2 SET id = 2 WHERE id = 1; + 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_2 SET id = 2 WHERE id = 1; (3 rows) step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -168,6 +186,9 @@ step s2-delete-table-2: DELETE FROM ref_table_2 WHERE id = 1; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -182,17 +203,20 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_2 WHERE id = 1; - 0|8429801| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_2 WHERE id = 1; - 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_2 WHERE id = 1; + 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_2 WHERE id = 1; + 0|8429801| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_2 WHERE id = 1; + 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_2 WHERE id = 1; (3 rows) step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -223,6 +247,9 @@ step s1-begin: BEGIN; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -237,12 +264,12 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; - 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; - 0|8429802| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; - 0|8429802| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; + 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; + 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; + 0|8429802| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; + 0|8429802| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| UPDATE ref_table_3 SET id = 2 WHERE id = 1; (4 rows) step s1-rollback: @@ -252,6 +279,9 @@ step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -282,6 +312,9 @@ step s1-begin: BEGIN; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -296,12 +329,12 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_3 WHERE id = 1; - 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_3 WHERE id = 1; - 0|8429802| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_3 WHERE id = 1; - 0|8429802| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| DELETE FROM ref_table_3 WHERE id = 1; + 0|8429800| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_3 WHERE id = 1; + 0|8429801| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_3 WHERE id = 1; + 0|8429802| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_3 WHERE id = 1; + 0|8429802| 5|ExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| DELETE FROM ref_table_3 WHERE id = 1; (4 rows) step s1-rollback: @@ -311,6 +344,9 @@ step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -338,6 +374,9 @@ step s2-insert-table-1: INSERT INTO ref_table_1 VALUES (7, 7); step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -352,16 +391,19 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_1 VALUES (7, 7); - 0|8429800| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_1 VALUES (7, 7); + 0|8429800| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_1 VALUES (7, 7); + 0|8429800| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_1 VALUES (7, 7); (2 rows) step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -389,6 +431,9 @@ step s2-insert-table-2: INSERT INTO ref_table_2 VALUES (7, 5); step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -403,17 +448,20 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_2 VALUES (7, 5); - 0|8429801| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_2 VALUES (7, 5); - 0|8429801| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_2 VALUES (7, 5); + 0|8429800| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_2 VALUES (7, 5); + 0|8429801| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_2 VALUES (7, 5); + 0|8429801| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_2 VALUES (7, 5); (3 rows) step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -441,6 +489,9 @@ step s2-insert-table-3: INSERT INTO ref_table_3 VALUES (7, 5); step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, @@ -455,18 +506,21 @@ step s1-view-locks: AND application_name <> 'Citus Maintenance Daemon' ORDER BY 1, 2, 3, 4; -classid| objid|objsubid|mode |application_name |backend_type |query +classid| objid|objsubid|mode |application_name |backend_type |query --------------------------------------------------------------------- - 0|8429800| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_3 VALUES (7, 5); - 0|8429801| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_3 VALUES (7, 5); - 0|8429802| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_3 VALUES (7, 5); - 0|8429802| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys|client backend| INSERT INTO ref_table_3 VALUES (7, 5); + 0|8429800| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_3 VALUES (7, 5); + 0|8429801| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_3 VALUES (7, 5); + 0|8429802| 4|ShareLock |isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_3 VALUES (7, 5); + 0|8429802| 5|RowExclusiveLock|isolation/isolation_ref2ref_foreign_keys/s2|client backend| INSERT INTO ref_table_3 VALUES (7, 5); (4 rows) step s2-rollback: ROLLBACK; step s1-view-locks: + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid, diff --git a/src/test/regress/spec/isolation_ref2ref_foreign_keys.spec b/src/test/regress/spec/isolation_ref2ref_foreign_keys.spec index 3b7e81673..4967883c0 100644 --- a/src/test/regress/spec/isolation_ref2ref_foreign_keys.spec +++ b/src/test/regress/spec/isolation_ref2ref_foreign_keys.spec @@ -74,6 +74,9 @@ step "s1-select-table-3" step "s1-view-locks" { + -- The following output changed in PG versions 13.6 and 14.2. The output is expected + -- to change in earlier versions of PG as the and application_name format did not use + -- to include session name at the end. SELECT classid, objid, objsubid,