From c5ecbbc25bc7fa309ab4c162bfc89603086757c6 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Mon, 16 Aug 2021 23:41:13 +0200 Subject: [PATCH] Bump postgres versions used in CI to latest Since the isolationtester got modified to improve the query result output which got backported in to PG12 and PG13 we have to adjust all isolationtester output. https://github.com/postgres/postgres/commit/4a05406 --- .github/workflows/coverity.yaml | 2 +- .github/workflows/cron-tests.yaml | 2 +- .../workflows/linux-32bit-build-and-test.yaml | 6 +- .../workflows/sanitizer-build-and-test.yaml | 2 +- .github/workflows/update-test.yaml | 12 +- .github/workflows/windows-build-and-test.yaml | 4 +- scripts/gh_matrix_builder.py | 12 +- .../expected/deadlock_dropchunks_select.out | 50 +- test/isolation/expected/dropchunks_race.out | 100 ++-- .../expected/insert_dropchunks_race.out | 12 +- test/isolation/expected/isolation_nop.out | 12 +- .../expected/multi_transaction_indexing.out | 34 +- .../expected/read_committed_insert.out | 24 +- .../expected/read_uncommitted_insert.out | 24 +- .../expected/repeatable_read_insert.out | 24 +- .../expected/serializable_insert.out | 36 +- .../expected/serializable_insert_rollback.out | 36 +- .../isolation/expected/compression_ddl.out | 148 ++++-- .../continuous_aggs_concurrent_refresh.out | 296 +++++++----- .../expected/continuous_aggs_insert.out | 68 ++- .../expected/continuous_aggs_multi.out | 80 ++-- .../deadlock_drop_chunks_compress.out | 116 +++-- .../isolation/expected/dist_restore_point.out | 444 ++++++++++++------ .../expected/remote_create_chunk.out | 126 +++-- .../isolation/expected/reorder_deadlock.out | 32 +- .../isolation/expected/reorder_vs_insert.out | 26 +- .../reorder_vs_insert_other_chunk.out | 24 +- .../isolation/expected/reorder_vs_select.out | 118 +++-- 28 files changed, 1235 insertions(+), 635 deletions(-) diff --git a/.github/workflows/coverity.yaml b/.github/workflows/coverity.yaml index 4c1bc516d..12240d228 100644 --- a/.github/workflows/coverity.yaml +++ b/.github/workflows/coverity.yaml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - pg: ["12.7", "13.3"] + pg: ["12.8", "13.4"] os: [ubuntu-20.04] env: PG_SRC_DIR: pgbuild diff --git a/.github/workflows/cron-tests.yaml b/.github/workflows/cron-tests.yaml index 84582401d..8b5be4116 100644 --- a/.github/workflows/cron-tests.yaml +++ b/.github/workflows/cron-tests.yaml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false env: - PG_VERSION: 12.6 + PG_VERSION: 12.8 steps: - name: Checkout TimescaleDB diff --git a/.github/workflows/linux-32bit-build-and-test.yaml b/.github/workflows/linux-32bit-build-and-test.yaml index 6b411b334..a8e8c3c0e 100644 --- a/.github/workflows/linux-32bit-build-and-test.yaml +++ b/.github/workflows/linux-32bit-build-and-test.yaml @@ -19,13 +19,13 @@ jobs: strategy: fail-fast: false matrix: - pg: [ "12.7", "13.3" ] + pg: [ "12.8", "13.4" ] build_type: [ Debug ] include: - - pg: 12.7 + - pg: 12.8 ignores: append-12 chunk_adaptive continuous_aggs_bgw_drop_chunks remote_txn transparent_decompression-12 plan_skip_scan-12 pg_major: 12 - - pg: 13.3 + - pg: 13.4 ignores: append-13 chunk_adaptive remote_txn transparent_decompression-13 vacuum_parallel plan_skip_scan-13 pg_major: 13 diff --git a/.github/workflows/sanitizer-build-and-test.yaml b/.github/workflows/sanitizer-build-and-test.yaml index c79caec54..687ea7659 100644 --- a/.github/workflows/sanitizer-build-and-test.yaml +++ b/.github/workflows/sanitizer-build-and-test.yaml @@ -43,7 +43,7 @@ jobs: matrix: # "os" has to be in the matrix due to a bug in "env": https://github.community/t/how-to-use-env-context/16975 os: ["ubuntu-20.04"] - pg: ["12.7", "13.3"] + pg: ["12.8", "13.4"] steps: - name: Install Linux Dependencies run: | diff --git a/.github/workflows/update-test.yaml b/.github/workflows/update-test.yaml index 703244b24..f5bd2b458 100644 --- a/.github/workflows/update-test.yaml +++ b/.github/workflows/update-test.yaml @@ -13,11 +13,11 @@ jobs: runs-on: 'ubuntu-latest' strategy: matrix: - pg: ["12.7","13.3"] + pg: ["12.8","13.4"] include: - - pg: 12.7 + - pg: 12.8 pg_major: 12 - - pg: 13.3 + - pg: 13.4 pg_major: 13 fail-fast: false env: @@ -48,11 +48,11 @@ jobs: runs-on: 'ubuntu-latest' strategy: matrix: - pg: ["12.7","13.3"] + pg: ["12.8","13.4"] include: - - pg: 12.7 + - pg: 12.8 pg_major: 12 - - pg: 13.3 + - pg: 13.4 pg_major: 13 fail-fast: false env: diff --git a/.github/workflows/windows-build-and-test.yaml b/.github/workflows/windows-build-and-test.yaml index d19b9af5a..d2517e5a8 100644 --- a/.github/workflows/windows-build-and-test.yaml +++ b/.github/workflows/windows-build-and-test.yaml @@ -17,9 +17,9 @@ jobs: build_type: [ Debug, Release ] include: - pg: 12 - pkg_version: 12.7.1 + pkg_version: 12.8.1 - pg: 13 - pkg_version: 13.3.1 + pkg_version: 13.4.1 env: # PostgreSQL configuration PGPORT: 6543 diff --git a/scripts/gh_matrix_builder.py b/scripts/gh_matrix_builder.py index 20db26694..f15c481b6 100644 --- a/scripts/gh_matrix_builder.py +++ b/scripts/gh_matrix_builder.py @@ -21,9 +21,9 @@ import sys event_type = sys.argv[1] PG12_EARLIEST = "12.0" -PG12_LATEST = "12.7" +PG12_LATEST = "12.8" PG13_EARLIEST = "13.2" -PG13_LATEST = "13.3" +PG13_LATEST = "13.4" m = {"include": [],} @@ -118,12 +118,16 @@ if event_type != "pull_request": # add debug test for first supported PG12 version pg12_debug_earliest = { "pg": PG12_EARLIEST, - "installcheck_args": "IGNORES='cluster-12'" + "installcheck_args": "IGNORES='cluster-12 compression_ddl continuous_aggs_concurrent_refresh continuous_aggs_insert continuous_aggs_multi deadlock_drop_chunks_compress deadlock_dropchunks_select dist_restore_point dropchunks_race insert_dropchunks_race isolation_nop multi_transaction_indexing read_committed_insert read_uncommitted_insert remote_create_chunk reorder_deadlock reorder_vs_insert reorder_vs_insert_other_chunk reorder_vs_select repeatable_read_insert serializable_insert serializable_insert_rollback'" } m["include"].append(build_debug_config(pg12_debug_earliest)) # add debug test for first supported PG13 version - m["include"].append(build_debug_config({"pg":PG13_EARLIEST})) + pg13_debug_earliest = { + "pg": PG13_EARLIEST, + "installcheck_args": "IGNORES='compression_ddl continuous_aggs_concurrent_refresh continuous_aggs_insert continuous_aggs_multi deadlock_drop_chunks_compress deadlock_dropchunks_select dist_restore_point dropchunks_race insert_dropchunks_race isolation_nop multi_transaction_indexing read_committed_insert read_uncommitted_insert remote_create_chunk reorder_deadlock reorder_vs_insert reorder_vs_insert_other_chunk reorder_vs_select repeatable_read_insert serializable_insert serializable_insert_rollback'" + } + m["include"].append(build_debug_config(pg13_debug_earliest)) # add debug test for MacOS m["include"].append(build_debug_config(macos_config({}))) diff --git a/test/isolation/expected/deadlock_dropchunks_select.out b/test/isolation/expected/deadlock_dropchunks_select.out index aa0a65e30..a71829f7b 100644 --- a/test/isolation/expected/deadlock_dropchunks_select.out +++ b/test/isolation/expected/deadlock_dropchunks_select.out @@ -2,32 +2,42 @@ Parsed test spec with 2 sessions starting permutation: s1a s1b s2a s2b step s1a: SELECT count (*) FROM drop_chunks('dt', '2018-12-25 00:00'::timestamptz); -count +count +----- + 24 +(1 row) -24 step s1b: COMMIT; step s2a: SELECT typ, loc, mtim FROM DT , SL , ST WHERE SL.lid = DT.lid AND ST.sid = DT.sid AND mtim >= '2018-12-01 03:00:00+00' AND mtim <= '2018-12-01 04:00:00+00' AND typ = 'T1' ; -typ loc mtim +typ|loc|mtim +---+---+---- +(0 rows) step s2b: COMMIT; starting permutation: s1a s2a s1b s2b step s1a: SELECT count (*) FROM drop_chunks('dt', '2018-12-25 00:00'::timestamptz); -count +count +----- + 24 +(1 row) -24 step s2a: SELECT typ, loc, mtim FROM DT , SL , ST WHERE SL.lid = DT.lid AND ST.sid = DT.sid AND mtim >= '2018-12-01 03:00:00+00' AND mtim <= '2018-12-01 04:00:00+00' AND typ = 'T1' ; step s1b: COMMIT; step s2a: <... completed> -typ loc mtim +typ|loc|mtim +---+---+---- +(0 rows) step s2b: COMMIT; starting permutation: s1a s2a s2b s1b step s1a: SELECT count (*) FROM drop_chunks('dt', '2018-12-25 00:00'::timestamptz); -count +count +----- + 24 +(1 row) -24 step s2a: SELECT typ, loc, mtim FROM DT , SL , ST WHERE SL.lid = DT.lid AND ST.sid = DT.sid AND mtim >= '2018-12-01 03:00:00+00' AND mtim <= '2018-12-01 04:00:00+00' AND typ = 'T1' ; step s2a: <... completed> ERROR: canceling statement due to lock timeout @@ -36,7 +46,9 @@ step s1b: COMMIT; starting permutation: s2a s1a s1b s2b step s2a: SELECT typ, loc, mtim FROM DT , SL , ST WHERE SL.lid = DT.lid AND ST.sid = DT.sid AND mtim >= '2018-12-01 03:00:00+00' AND mtim <= '2018-12-01 04:00:00+00' AND typ = 'T1' ; -typ loc mtim +typ|loc|mtim +---+---+---- +(0 rows) step s1a: SELECT count (*) FROM drop_chunks('dt', '2018-12-25 00:00'::timestamptz); step s1a: <... completed> @@ -46,23 +58,31 @@ step s2b: COMMIT; starting permutation: s2a s1a s2b s1b step s2a: SELECT typ, loc, mtim FROM DT , SL , ST WHERE SL.lid = DT.lid AND ST.sid = DT.sid AND mtim >= '2018-12-01 03:00:00+00' AND mtim <= '2018-12-01 04:00:00+00' AND typ = 'T1' ; -typ loc mtim +typ|loc|mtim +---+---+---- +(0 rows) step s1a: SELECT count (*) FROM drop_chunks('dt', '2018-12-25 00:00'::timestamptz); step s2b: COMMIT; step s1a: <... completed> -count +count +----- + 24 +(1 row) -24 step s1b: COMMIT; starting permutation: s2a s2b s1a s1b step s2a: SELECT typ, loc, mtim FROM DT , SL , ST WHERE SL.lid = DT.lid AND ST.sid = DT.sid AND mtim >= '2018-12-01 03:00:00+00' AND mtim <= '2018-12-01 04:00:00+00' AND typ = 'T1' ; -typ loc mtim +typ|loc|mtim +---+---+---- +(0 rows) step s2b: COMMIT; step s1a: SELECT count (*) FROM drop_chunks('dt', '2018-12-25 00:00'::timestamptz); -count +count +----- + 24 +(1 row) -24 step s1b: COMMIT; diff --git a/test/isolation/expected/dropchunks_race.out b/test/isolation/expected/dropchunks_race.out index e9ef6020c..f7512958e 100644 --- a/test/isolation/expected/dropchunks_race.out +++ b/test/isolation/expected/dropchunks_race.out @@ -3,88 +3,126 @@ Parsed test spec with 5 sessions starting permutation: s3_chunks_found_wait s1_drop_chunks s2_drop_chunks s3_chunks_found_release s3_show_missing_slices s3_show_num_chunks s3_show_data step s3_chunks_found_wait: SELECT debug_waitpoint_enable('drop_chunks_chunks_found'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_drop_chunks: SELECT count(*) FROM drop_chunks('dropchunks_race_t1', TIMESTAMPTZ '2020-03-01'); step s2_drop_chunks: SELECT count(*) FROM drop_chunks('dropchunks_race_t1', TIMESTAMPTZ '2020-03-01'); step s3_chunks_found_release: SELECT debug_waitpoint_release('drop_chunks_chunks_found'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_drop_chunks: <... completed> -count +count +----- + 1 +(1 row) -1 step s2_drop_chunks: <... completed> -count +count +----- + 0 +(1 row) -0 step s3_show_missing_slices: SELECT count(*) FROM _timescaledb_catalog.chunk_constraint WHERE dimension_slice_id NOT IN (SELECT id FROM _timescaledb_catalog.dimension_slice); -count +count +----- + 0 +(1 row) -0 step s3_show_num_chunks: SELECT count(*) FROM show_chunks('dropchunks_race_t1') ORDER BY 1; -count +count +----- + 0 +(1 row) -0 step s3_show_data: SELECT * FROM dropchunks_race_t1 ORDER BY 1; -time device temp +time|device|temp +----+------+---- +(0 rows) starting permutation: s4_chunks_dropped_wait s1_drop_chunks s5_insert_new_chunk s4_chunks_dropped_release s3_show_missing_slices s3_show_num_chunks s3_show_data step s4_chunks_dropped_wait: SELECT debug_waitpoint_enable('drop_chunks_end'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_drop_chunks: SELECT count(*) FROM drop_chunks('dropchunks_race_t1', TIMESTAMPTZ '2020-03-01'); step s5_insert_new_chunk: INSERT INTO dropchunks_race_t1 VALUES ('2020-03-01 10:30', 1, 2.2); step s4_chunks_dropped_release: SELECT debug_waitpoint_release('drop_chunks_end'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_drop_chunks: <... completed> -count +count +----- + 1 +(1 row) -1 step s5_insert_new_chunk: <... completed> step s3_show_missing_slices: SELECT count(*) FROM _timescaledb_catalog.chunk_constraint WHERE dimension_slice_id NOT IN (SELECT id FROM _timescaledb_catalog.dimension_slice); -count +count +----- + 0 +(1 row) -0 step s3_show_num_chunks: SELECT count(*) FROM show_chunks('dropchunks_race_t1') ORDER BY 1; -count +count +----- + 1 +(1 row) -1 step s3_show_data: SELECT * FROM dropchunks_race_t1 ORDER BY 1; -time device temp +time |device|temp +----------------------------+------+---- +Sun Mar 01 10:30:00 2020 PST| 1| 2.2 +(1 row) -Sun Mar 01 10:30:00 2020 PST1 2.2 starting permutation: s4_chunks_dropped_wait s1_drop_chunks s5_insert_old_chunk s4_chunks_dropped_release s3_show_missing_slices s3_show_num_chunks s3_show_data step s4_chunks_dropped_wait: SELECT debug_waitpoint_enable('drop_chunks_end'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_drop_chunks: SELECT count(*) FROM drop_chunks('dropchunks_race_t1', TIMESTAMPTZ '2020-03-01'); step s5_insert_old_chunk: INSERT INTO dropchunks_race_t1 VALUES ('2020-01-02 10:31', 1, 1.1); step s4_chunks_dropped_release: SELECT debug_waitpoint_release('drop_chunks_end'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_drop_chunks: <... completed> -count +count +----- + 1 +(1 row) -1 step s5_insert_old_chunk: <... completed> step s3_show_missing_slices: SELECT count(*) FROM _timescaledb_catalog.chunk_constraint WHERE dimension_slice_id NOT IN (SELECT id FROM _timescaledb_catalog.dimension_slice); -count +count +----- + 0 +(1 row) -0 step s3_show_num_chunks: SELECT count(*) FROM show_chunks('dropchunks_race_t1') ORDER BY 1; -count +count +----- + 1 +(1 row) -1 step s3_show_data: SELECT * FROM dropchunks_race_t1 ORDER BY 1; -time device temp +time |device|temp +----------------------------+------+---- +Thu Jan 02 10:31:00 2020 PST| 1| 1.1 +(1 row) -Thu Jan 02 10:31:00 2020 PST1 1.1 diff --git a/test/isolation/expected/insert_dropchunks_race.out b/test/isolation/expected/insert_dropchunks_race.out index 2d0406cfd..76317f6b5 100644 --- a/test/isolation/expected/insert_dropchunks_race.out +++ b/test/isolation/expected/insert_dropchunks_race.out @@ -5,11 +5,15 @@ step s1a: INSERT INTO insert_dropchunks_race_t1 VALUES ('2020-01-03 10:30', 3, 3 step s2a: SELECT COUNT(*) FROM drop_chunks('insert_dropchunks_race_t1', TIMESTAMPTZ '2020-03-01'); step s1b: COMMIT; step s2a: <... completed> -count +count +----- + 2 +(1 row) -2 step s2b: COMMIT; step s1c: SELECT COUNT(*) FROM _timescaledb_catalog.chunk_constraint LEFT JOIN _timescaledb_catalog.dimension_slice sl ON dimension_slice_id = sl.id WHERE sl.id IS NULL; -count +count +----- + 0 +(1 row) -0 diff --git a/test/isolation/expected/isolation_nop.out b/test/isolation/expected/isolation_nop.out index 48cc2c1f4..8c79d4d3e 100644 --- a/test/isolation/expected/isolation_nop.out +++ b/test/isolation/expected/isolation_nop.out @@ -2,9 +2,13 @@ Parsed test spec with 1 sessions starting permutation: s1a table_name - +--------------- ts_cluster_test -step s1a: SELECT pg_sleep(0); -pg_sleep +(1 row) + +step s1a: SELECT pg_sleep(0); +pg_sleep +-------- + +(1 row) - diff --git a/test/isolation/expected/multi_transaction_indexing.out b/test/isolation/expected/multi_transaction_indexing.out index aa84e39d9..fad0736e2 100644 --- a/test/isolation/expected/multi_transaction_indexing.out +++ b/test/isolation/expected/multi_transaction_indexing.out @@ -8,8 +8,10 @@ step Bc: ROLLBACK; step CI: <... completed> step P: SELECT * FROM hypertable_index_size('test_index'); hypertable_index_size +--------------------- + 73728 +(1 row) -73728 step Sc: COMMIT; starting permutation: I1 CI Bc Ic P Sc @@ -20,41 +22,51 @@ step Ic: COMMIT; step CI: <... completed> step P: SELECT * FROM hypertable_index_size('test_index'); hypertable_index_size +--------------------- + 73728 +(1 row) -73728 step Sc: COMMIT; starting permutation: S1 CI Bc Sc P Ic step S1: SELECT * FROM ts_index_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step CI: CREATE INDEX test_index ON ts_index_test(location) WITH (timescaledb.transaction_per_chunk, timescaledb.barrier_table='barrier'); step Bc: ROLLBACK; step CI: <... completed> step Sc: COMMIT; step P: SELECT * FROM hypertable_index_size('test_index'); hypertable_index_size +--------------------- + 57344 +(1 row) -57344 step Ic: COMMIT; starting permutation: F WPE CI DI Bc WPR P Ic Sc step F: SET client_min_messages TO 'error'; step WPE: SELECT debug_waitpoint_enable('process_index_start_indexing_done'); debug_waitpoint_enable +---------------------- + +(1 row) - step CI: CREATE INDEX test_index ON ts_index_test(location) WITH (timescaledb.transaction_per_chunk, timescaledb.barrier_table='barrier'); step DI: DROP INDEX test_index; step Bc: ROLLBACK; step DI: <... completed> step WPR: SELECT debug_waitpoint_release('process_index_start_indexing_done'); debug_waitpoint_release +----------------------- + +(1 row) - step CI: <... completed> step P: SELECT * FROM hypertable_index_size('test_index'); ERROR: relation "test_index" does not exist @@ -69,7 +81,9 @@ step CI: <... completed> step RI: <... completed> step P: SELECT * FROM hypertable_index_size('test_index'); hypertable_index_size +--------------------- + 57344 +(1 row) -57344 step Ic: COMMIT; step Sc: COMMIT; diff --git a/test/isolation/expected/read_committed_insert.out b/test/isolation/expected/read_committed_insert.out index e7f04e83a..8795f2873 100644 --- a/test/isolation/expected/read_committed_insert.out +++ b/test/isolation/expected/read_committed_insert.out @@ -2,8 +2,10 @@ Parsed test spec with 2 sessions starting permutation: s1a s1c s2a s2b table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s1c: COMMIT; step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); @@ -11,8 +13,10 @@ step s2b: COMMIT; starting permutation: s1a s2a s1c s2b table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1c: COMMIT; @@ -21,8 +25,10 @@ step s2b: COMMIT; starting permutation: s1a s2a s2b s1c table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s2a: <... completed> @@ -32,8 +38,10 @@ step s1c: COMMIT; starting permutation: s2a s1a s1c s2b table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s1a: <... completed> @@ -43,8 +51,10 @@ step s2b: COMMIT; starting permutation: s2a s1a s2b s1c table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2b: COMMIT; @@ -53,8 +63,10 @@ step s1c: COMMIT; starting permutation: s2a s2b s1a s1c table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s2b: COMMIT; step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); diff --git a/test/isolation/expected/read_uncommitted_insert.out b/test/isolation/expected/read_uncommitted_insert.out index e7f04e83a..8795f2873 100644 --- a/test/isolation/expected/read_uncommitted_insert.out +++ b/test/isolation/expected/read_uncommitted_insert.out @@ -2,8 +2,10 @@ Parsed test spec with 2 sessions starting permutation: s1a s1c s2a s2b table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s1c: COMMIT; step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); @@ -11,8 +13,10 @@ step s2b: COMMIT; starting permutation: s1a s2a s1c s2b table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1c: COMMIT; @@ -21,8 +25,10 @@ step s2b: COMMIT; starting permutation: s1a s2a s2b s1c table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s2a: <... completed> @@ -32,8 +38,10 @@ step s1c: COMMIT; starting permutation: s2a s1a s1c s2b table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s1a: <... completed> @@ -43,8 +51,10 @@ step s2b: COMMIT; starting permutation: s2a s1a s2b s1c table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2b: COMMIT; @@ -53,8 +63,10 @@ step s1c: COMMIT; starting permutation: s2a s2b s1a s1c table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s2b: COMMIT; step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); diff --git a/test/isolation/expected/repeatable_read_insert.out b/test/isolation/expected/repeatable_read_insert.out index e7f04e83a..8795f2873 100644 --- a/test/isolation/expected/repeatable_read_insert.out +++ b/test/isolation/expected/repeatable_read_insert.out @@ -2,8 +2,10 @@ Parsed test spec with 2 sessions starting permutation: s1a s1c s2a s2b table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s1c: COMMIT; step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); @@ -11,8 +13,10 @@ step s2b: COMMIT; starting permutation: s1a s2a s1c s2b table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1c: COMMIT; @@ -21,8 +25,10 @@ step s2b: COMMIT; starting permutation: s1a s2a s2b s1c table_name - +--------------- ts_cluster_test +(1 row) + step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s2a: <... completed> @@ -32,8 +38,10 @@ step s1c: COMMIT; starting permutation: s2a s1a s1c s2b table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s1a: <... completed> @@ -43,8 +51,10 @@ step s2b: COMMIT; starting permutation: s2a s1a s2b s1c table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); step s2b: COMMIT; @@ -53,8 +63,10 @@ step s1c: COMMIT; starting permutation: s2a s2b s1a s1c table_name - +--------------- ts_cluster_test +(1 row) + step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090002', 0.72, 1); step s2b: COMMIT; step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T090001', 23.4, 1); diff --git a/test/isolation/expected/serializable_insert.out b/test/isolation/expected/serializable_insert.out index cdc90de63..bdb6d5de0 100644 --- a/test/isolation/expected/serializable_insert.out +++ b/test/isolation/expected/serializable_insert.out @@ -1,18 +1,22 @@ Parsed test spec with 2 sessions starting permutation: s1a s1c s2a s2c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s1c: COMMIT; step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s2c: COMMIT; starting permutation: s1a s2a s1c s2c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s1c: COMMIT; @@ -20,9 +24,11 @@ step s2a: <... completed> step s2c: COMMIT; starting permutation: s1a s2a s2c s1c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s2a: <... completed> @@ -31,9 +37,11 @@ step s2c: COMMIT; step s1c: COMMIT; starting permutation: s2a s1a s1c s2c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s1a: <... completed> @@ -42,9 +50,11 @@ step s1c: COMMIT; step s2c: COMMIT; starting permutation: s2a s1a s2c s1c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s2c: COMMIT; @@ -52,9 +62,11 @@ step s1a: <... completed> step s1c: COMMIT; starting permutation: s2a s2c s1a s1c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s2c: COMMIT; step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); diff --git a/test/isolation/expected/serializable_insert_rollback.out b/test/isolation/expected/serializable_insert_rollback.out index 465ee9ddb..f1cb9a83f 100644 --- a/test/isolation/expected/serializable_insert_rollback.out +++ b/test/isolation/expected/serializable_insert_rollback.out @@ -1,18 +1,22 @@ Parsed test spec with 2 sessions starting permutation: s1a s1c s2a s2c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s1c: ROLLBACK; step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s2c: COMMIT; starting permutation: s1a s2a s1c s2c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s1c: ROLLBACK; @@ -20,9 +24,11 @@ step s2a: <... completed> step s2c: COMMIT; starting permutation: s1a s2a s2c s1c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s2a: <... completed> @@ -31,9 +37,11 @@ step s2c: COMMIT; step s1c: ROLLBACK; starting permutation: s2a s1a s1c s2c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s1a: <... completed> @@ -42,9 +50,11 @@ step s1c: ROLLBACK; step s2c: COMMIT; starting permutation: s2a s1a s2c s1c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); step s2c: COMMIT; @@ -52,9 +62,11 @@ step s1a: <... completed> step s1c: ROLLBACK; starting permutation: s2a s2c s1a s1c -schema_name table_name +schema_name|table_name +-----------+--------------- +public |ts_cluster_test +(1 row) -public ts_cluster_test step s2a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:02', 0.72, 1); step s2c: COMMIT; step s1a: INSERT INTO ts_cluster_test VALUES ('2017-01-20T09:00:01', 23.4, 1); diff --git a/tsl/test/isolation/expected/compression_ddl.out b/tsl/test/isolation/expected/compression_ddl.out index 40fdd0ccf..2c7d63757 100644 --- a/tsl/test/isolation/expected/compression_ddl.out +++ b/tsl/test/isolation/expected/compression_ddl.out @@ -10,8 +10,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step I1: BEGIN; INSERT INTO ts_device_table VALUES (1, 1, 100, 100); step C1: BEGIN; @@ -27,18 +29,24 @@ step UnlockChunk: ROLLBACK; step I1: <... completed> step Ic: COMMIT; step C1: <... completed> -compress_chunk - +compress_chunk +-------------------------------------- _timescaledb_internal._hyper_1_1_chunk +(1 row) + step Cc: COMMIT; step SC1: SELECT count(*) from _timescaledb_internal._hyper_1_1_chunk; -count +count +----- + 0 +(1 row) -0 step S1: SELECT count(*) from ts_device_table; -count +count +----- + 31 +(1 row) -31 starting permutation: LockChunk1 C1 I1 UnlockChunk Cc Ic step LockChunk1: @@ -50,8 +58,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step C1: BEGIN; SET LOCAL lock_timeout = '500ms'; @@ -65,9 +75,11 @@ step C1: step I1: BEGIN; INSERT INTO ts_device_table VALUES (1, 1, 100, 100); step UnlockChunk: ROLLBACK; step C1: <... completed> -compress_chunk - +compress_chunk +-------------------------------------- _timescaledb_internal._hyper_3_5_chunk +(1 row) + step Cc: COMMIT; step I1: <... completed> step Ic: COMMIT; @@ -82,8 +94,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step A1: BEGIN; ALTER TABLE ts_device_table SET ( fillfactor = 80); step C1: BEGIN; @@ -112,8 +126,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step A1: BEGIN; ALTER TABLE ts_device_table SET ( fillfactor = 80); step C1: BEGIN; @@ -129,9 +145,11 @@ step UnlockChunk: ROLLBACK; step A1: <... completed> step A2: COMMIT; step C1: <... completed> -compress_chunk - +compress_chunk +--------------------------------------- _timescaledb_internal._hyper_7_12_chunk +(1 row) + step Cc: COMMIT; starting permutation: LockChunk1 C1 D1 UnlockChunk Cc Dc @@ -144,8 +162,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step C1: BEGIN; SET LOCAL lock_timeout = '500ms'; @@ -167,9 +187,11 @@ step D1: ERROR: chunk "_hyper_9_16_chunk" is not compressed step UnlockChunk: ROLLBACK; step C1: <... completed> -compress_chunk - +compress_chunk +--------------------------------------- _timescaledb_internal._hyper_9_16_chunk +(1 row) + step Cc: COMMIT; step Dc: COMMIT; @@ -183,8 +205,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step C1: BEGIN; SET LOCAL lock_timeout = '500ms'; @@ -196,19 +220,25 @@ step C1: ORDER BY ch.id LIMIT 1; step S1: SELECT count(*) from ts_device_table; -count +count +----- + 30 +(1 row) -30 step UnlockChunk: ROLLBACK; step C1: <... completed> -compress_chunk - +compress_chunk +---------------------------------------- _timescaledb_internal._hyper_11_20_chunk +(1 row) + step Cc: COMMIT; step SH: SELECT total_chunks, number_compressed_chunks from hypertable_compression_stats('ts_device_table'); -total_chunks number_compressed_chunks +total_chunks|number_compressed_chunks +------------+------------------------ + 3| 1 +(1 row) -3 1 starting permutation: LockChunk1 C1 S1 UnlockChunk SH Cc step LockChunk1: @@ -220,8 +250,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step C1: BEGIN; SET LOCAL lock_timeout = '500ms'; @@ -233,18 +265,24 @@ step C1: ORDER BY ch.id LIMIT 1; step S1: SELECT count(*) from ts_device_table; -count +count +----- + 30 +(1 row) -30 step UnlockChunk: ROLLBACK; step C1: <... completed> -compress_chunk - +compress_chunk +---------------------------------------- _timescaledb_internal._hyper_13_24_chunk -step SH: SELECT total_chunks, number_compressed_chunks from hypertable_compression_stats('ts_device_table'); -total_chunks number_compressed_chunks +(1 row) + +step SH: SELECT total_chunks, number_compressed_chunks from hypertable_compression_stats('ts_device_table'); +total_chunks|number_compressed_chunks +------------+------------------------ + 3| 0 +(1 row) -3 0 step Cc: COMMIT; starting permutation: C1 Cc LockChunkTuple I1 IN1 UnlockChunkTuple Ic INc SChunkStat @@ -258,18 +296,22 @@ step C1: WHERE ch.hypertable_id = ht.id AND ht.table_name like 'ts_device_table' ORDER BY ch.id LIMIT 1; -compress_chunk - +compress_chunk +---------------------------------------- _timescaledb_internal._hyper_15_28_chunk +(1 row) + step Cc: COMMIT; step LockChunkTuple: BEGIN; SELECT status as chunk_status from _timescaledb_catalog.chunk WHERE id = ( select min(ch.id) FROM _timescaledb_catalog.hypertable ht, _timescaledb_catalog.chunk ch WHERE ch.hypertable_id = ht.id AND ht.table_name like 'ts_device_table') FOR UPDATE; -chunk_status +chunk_status +------------ + 1 +(1 row) -1 step I1: BEGIN; INSERT INTO ts_device_table VALUES (1, 1, 100, 100); step IN1: BEGIN; INSERT INTO ts_device_table VALUES (1, 1, 200, 100); step UnlockChunkTuple: ROLLBACK; @@ -279,9 +321,11 @@ step IN1: <... completed> step INc: COMMIT; step SChunkStat: SELECT status from _timescaledb_catalog.chunk WHERE id = ( select min(ch.id) FROM _timescaledb_catalog.hypertable ht, _timescaledb_catalog.chunk ch WHERE ch.hypertable_id = ht.id AND ht.table_name like 'ts_device_table'); -status +status +------ + 3 +(1 row) -3 starting permutation: CA1 CAc I1 Ic SChunkStat LockChunk1 RC1 IN1 UnlockChunk RCc INc SH step CA1: @@ -292,19 +336,23 @@ step CA1: WHERE ch.hypertable_id = ht.id AND ht.table_name like 'ts_device_table' ORDER BY ch.id; -compress_chunk - +compress_chunk +---------------------------------------- _timescaledb_internal._hyper_17_32_chunk _timescaledb_internal._hyper_17_33_chunk _timescaledb_internal._hyper_17_34_chunk +(3 rows) + step CAc: COMMIT; step I1: BEGIN; INSERT INTO ts_device_table VALUES (1, 1, 100, 100); step Ic: COMMIT; step SChunkStat: SELECT status from _timescaledb_catalog.chunk WHERE id = ( select min(ch.id) FROM _timescaledb_catalog.hypertable ht, _timescaledb_catalog.chunk ch WHERE ch.hypertable_id = ht.id AND ht.table_name like 'ts_device_table'); -status +status +------ + 3 +(1 row) -3 step LockChunk1: BEGIN; SELECT @@ -314,8 +362,10 @@ step LockChunk1: ORDER BY ch.id LIMIT 1; lock_chunktable - +--------------- +(1 row) + step RC1: BEGIN; SELECT @@ -328,13 +378,17 @@ step RC1: step IN1: BEGIN; INSERT INTO ts_device_table VALUES (1, 1, 200, 100); step UnlockChunk: ROLLBACK; step RC1: <... completed> -recompress_chunk - +recompress_chunk +---------------------------------------- _timescaledb_internal._hyper_17_32_chunk +(1 row) + step RCc: COMMIT; step IN1: <... completed> step INc: COMMIT; step SH: SELECT total_chunks, number_compressed_chunks from hypertable_compression_stats('ts_device_table'); -total_chunks number_compressed_chunks +total_chunks|number_compressed_chunks +------------+------------------------ + 3| 3 +(1 row) -3 3 diff --git a/tsl/test/isolation/expected/continuous_aggs_concurrent_refresh.out b/tsl/test/isolation/expected/continuous_aggs_concurrent_refresh.out index af1b7c9d2..7c9f701a8 100644 --- a/tsl/test/isolation/expected/continuous_aggs_concurrent_refresh.out +++ b/tsl/test/isolation/expected/continuous_aggs_concurrent_refresh.out @@ -15,21 +15,27 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 +(7 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 cagg_bucket_count +----------------- + 7 +(1 row) -7 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 70 +(1 row) -conditions 70 step R3_refresh: CALL refresh_continuous_aggregate('cond_10', 70, 107); @@ -44,24 +50,30 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 + 70| 24.6 + 80| 23.6 + 90| 21.3 +(10 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 -70 24.6 -80 23.6 -90 21.3 cagg_bucket_count +----------------- + 10 +(1 row) -10 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 100 +(1 row) -conditions 100 step L2_read_unlock_threshold_table: ROLLBACK; @@ -95,20 +107,26 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 70| 24.6 + 80| 23.6 + 90| 21.3 +(6 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -70 24.6 -80 23.6 -90 21.3 cagg_bucket_count +----------------- + 6 +(1 row) -6 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 100 +(1 row) -conditions 100 step L3_unlock_cagg_table: ROLLBACK; @@ -142,24 +160,30 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 + 70| 24.6 + 80| 23.6 + 90| 21.3 +(10 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 -70 24.6 -80 23.6 -90 21.3 cagg_bucket_count +----------------- + 10 +(1 row) -10 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 100 +(1 row) -conditions 100 step L3_unlock_cagg_table: ROLLBACK; @@ -193,24 +217,30 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 + 70| 24.6 + 80| 23.6 + 90| 21.3 +(10 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 -70 24.6 -80 23.6 -90 21.3 cagg_bucket_count +----------------- + 10 +(1 row) -10 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 100 +(1 row) -conditions 100 step L3_unlock_cagg_table: ROLLBACK; @@ -222,9 +252,11 @@ starting permutation: L3_lock_cagg_table R1_refresh L3_unlock_cagg_table S1_sele step L3_lock_cagg_table: SELECT lock_cagg('cond_10'); -lock_cagg +lock_cagg +--------- + +(1 row) - step R1_refresh: CALL refresh_continuous_aggregate('cond_10', 25, 70); @@ -243,21 +275,27 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 +(7 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 cagg_bucket_count +----------------- + 7 +(1 row) -7 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 70 +(1 row) -conditions 70 step L1_unlock_threshold_table: ROLLBACK; @@ -269,9 +307,11 @@ starting permutation: L3_lock_cagg_table R1_refresh R2_refresh L3_unlock_cagg_ta step L3_lock_cagg_table: SELECT lock_cagg('cond_10'); -lock_cagg +lock_cagg +--------- + +(1 row) - step R1_refresh: CALL refresh_continuous_aggregate('cond_10', 25, 70); @@ -295,21 +335,27 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 +(7 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 cagg_bucket_count +----------------- + 7 +(1 row) -7 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 70 +(1 row) -conditions 70 step L1_unlock_threshold_table: ROLLBACK; @@ -321,9 +367,11 @@ starting permutation: L3_lock_cagg_table R1_refresh R3_refresh L3_unlock_cagg_ta step L3_lock_cagg_table: SELECT lock_cagg('cond_10'); -lock_cagg +lock_cagg +--------- + +(1 row) - step R1_refresh: CALL refresh_continuous_aggregate('cond_10', 25, 70); @@ -346,24 +394,30 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 30| 18.3 + 40|16.0909090909091 + 50| 26.9 + 60| 18.9 + 70| 24.6 + 80| 23.6 + 90| 21.3 +(10 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -30 18.3 -40 16.0909090909091 -50 26.9 -60 18.9 -70 24.6 -80 23.6 -90 21.3 cagg_bucket_count +----------------- + 10 +(1 row) -10 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 100 +(1 row) -conditions 100 step L1_unlock_threshold_table: ROLLBACK; @@ -375,9 +429,11 @@ starting permutation: L3_lock_cagg_table R3_refresh R4_refresh L3_unlock_cagg_ta step L3_lock_cagg_table: SELECT lock_cagg('cond_10'); -lock_cagg +lock_cagg +--------- + +(1 row) - step R3_refresh: CALL refresh_continuous_aggregate('cond_10', 70, 107); @@ -399,20 +455,26 @@ step S1_select: _timescaledb_catalog.hypertable h WHERE it.hypertable_id = h.id; -bucket avg_temp +bucket| avg_temp +------+---------------- + 0|15.8888888888889 + 10| 14.2 + 20| 13.4 + 70| 24.6 + 80| 23.6 + 90| 21.3 +(6 rows) -0 15.8888888888889 -10 14.2 -20 13.4 -70 24.6 -80 23.6 -90 21.3 cagg_bucket_count +----------------- + 6 +(1 row) -6 -hypertable threshold +hypertable|threshold +----------+--------- +conditions| 100 +(1 row) -conditions 100 step L1_unlock_threshold_table: ROLLBACK; diff --git a/tsl/test/isolation/expected/continuous_aggs_insert.out b/tsl/test/isolation/expected/continuous_aggs_insert.out index 579087a7a..d5f3fccab 100644 --- a/tsl/test/isolation/expected/continuous_aggs_insert.out +++ b/tsl/test/isolation/expected/continuous_aggs_insert.out @@ -12,9 +12,11 @@ step Refresh: <... completed> starting permutation: Ib LockCagg I1 Refresh Ic UnlockCagg step Ib: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; step LockCagg: BEGIN; SELECT lock_cagg('continuous_view'); -lock_cagg +lock_cagg +--------- + +(1 row) - step I1: INSERT INTO ts_continuous_test VALUES (1, 1); step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step Ic: COMMIT; @@ -24,9 +26,11 @@ step Refresh: <... completed> starting permutation: Ib LockCagg Refresh I1 Ic UnlockCagg step Ib: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; step LockCagg: BEGIN; SELECT lock_cagg('continuous_view'); -lock_cagg +lock_cagg +--------- + +(1 row) - step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step I1: INSERT INTO ts_continuous_test VALUES (1, 1); step Ic: COMMIT; @@ -36,14 +40,18 @@ step Refresh: <... completed> starting permutation: Sb LockCagg Refresh S1 Sc UnlockCagg step Sb: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; step LockCagg: BEGIN; SELECT lock_cagg('continuous_view'); -lock_cagg +lock_cagg +--------- + +(1 row) - step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step S1: SELECT count(*) FROM ts_continuous_test; -count +count +----- + 30 +(1 row) -30 step Sc: COMMIT; step UnlockCagg: ROLLBACK; step Refresh: <... completed> @@ -51,13 +59,17 @@ step Refresh: <... completed> starting permutation: Sb LockCagg S1 Refresh Sc UnlockCagg step Sb: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; step LockCagg: BEGIN; SELECT lock_cagg('continuous_view'); -lock_cagg +lock_cagg +--------- + +(1 row) - step S1: SELECT count(*) FROM ts_continuous_test; -count +count +----- + 30 +(1 row) -30 step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step Sc: COMMIT; step UnlockCagg: ROLLBACK; @@ -124,11 +136,13 @@ step Refresh: <... completed> starting permutation: Refresh SV1 LockMatInval Refresh1 Ib I1 LockInvalThrEx Ic UnlockMatInval UnlockInvalThrEx SV1 step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step SV1: SELECT * FROM continuous_view order by 1; -time_bucket count +time_bucket|count +-----------+----- + 0| 5 + 5| 5 + 10| 5 +(3 rows) -0 5 -5 5 -10 5 step LockMatInval: BEGIN; LOCK TABLE _timescaledb_catalog.continuous_aggs_materialization_invalidation_log; step Refresh1: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step Ib: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; @@ -142,11 +156,13 @@ step LockInvalThrEx: <... completed> step UnlockInvalThrEx: ROLLBACK; step Ic: <... completed> step SV1: SELECT * FROM continuous_view order by 1; -time_bucket count +time_bucket|count +-----------+----- + 0| 5 + 5| 5 + 10| 5 +(3 rows) -0 5 -5 5 -10 5 starting permutation: I1 Refresh LockInval Refresh Sb S1 Sc UnlockInval step I1: INSERT INTO ts_continuous_test VALUES (1, 1); @@ -155,9 +171,11 @@ step LockInval: BEGIN; LOCK TABLE _timescaledb_catalog.continuous_aggs_hypertabl step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step Sb: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; step S1: SELECT count(*) FROM ts_continuous_test; -count +count +----- + 31 +(1 row) -31 step Sc: COMMIT; step UnlockInval: ROLLBACK; R: NOTICE: continuous aggregate "continuous_view" is already up-to-date @@ -169,9 +187,11 @@ step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step LockInval: BEGIN; LOCK TABLE _timescaledb_catalog.continuous_aggs_hypertable_invalidation_log; step Sb: BEGIN; SET LOCAL lock_timeout = '500ms'; SET LOCAL deadlock_timeout = '10ms'; step S1: SELECT count(*) FROM ts_continuous_test; -count +count +----- + 31 +(1 row) -31 step Refresh: CALL refresh_continuous_aggregate('continuous_view', NULL, 15); step Sc: COMMIT; step UnlockInval: ROLLBACK; diff --git a/tsl/test/isolation/expected/continuous_aggs_multi.out b/tsl/test/isolation/expected/continuous_aggs_multi.out index 4b9713597..fe4ff4d27 100644 --- a/tsl/test/isolation/expected/continuous_aggs_multi.out +++ b/tsl/test/isolation/expected/continuous_aggs_multi.out @@ -18,9 +18,11 @@ step Setup2: step LockMat1: BEGIN; select lock_mattable(tab) FROM ( SELECT format('%I.%I',materialization_hypertable_schema, materialization_hypertable_name) as tab from timescaledb_information.continuous_aggregates where view_name::text like 'continuous_view_1') q ; -lock_mattable +lock_mattable +------------- + +(1 row) - step Refresh1: CALL refresh_continuous_aggregate('continuous_view_1', NULL, 30); step Refresh2: CALL refresh_continuous_aggregate('continuous_view_2', NULL, NULL); step UnlockMat1: ROLLBACK; @@ -46,22 +48,28 @@ step Refresh1: CALL refresh_continuous_aggregate('continuous_view_1', NULL, 30); step Refresh2: CALL refresh_continuous_aggregate('continuous_view_2', NULL, NULL); step LockMat1: BEGIN; select lock_mattable(tab) FROM ( SELECT format('%I.%I',materialization_hypertable_schema, materialization_hypertable_name) as tab from timescaledb_information.continuous_aggregates where view_name::text like 'continuous_view_1') q ; -lock_mattable +lock_mattable +------------- + +(1 row) - step I1: INSERT INTO ts_continuous_test SELECT 0, i*10 FROM (SELECT generate_series(0, 10) AS i) AS i; step Refresh1: CALL refresh_continuous_aggregate('continuous_view_1', NULL, 30); step Refresh2: CALL refresh_continuous_aggregate('continuous_view_2', NULL, NULL); step UnlockMat1: ROLLBACK; step Refresh1: <... completed> step Refresh1_sel: select * from continuous_view_1 where bkt = 0 or bkt > 30 -bkt cnt +bkt|cnt +---+--- + 0| 16 +(1 row) -0 16 step Refresh2_sel: select * from continuous_view_2 where bkt = 0 or bkt > 30 order by bkt; -bkt maxl +bkt|maxl +---+---- + 0| 100 +(1 row) -0 100 starting permutation: Setup2 Refresh1 Refresh2 Refresh1_sel Refresh2_sel LockMat1 I2 Refresh1 Refresh2 UnlockMat1 Refresh1_sel Refresh2_sel step Setup2: @@ -82,18 +90,24 @@ step Setup2: step Refresh1: CALL refresh_continuous_aggregate('continuous_view_1', NULL, 30); step Refresh2: CALL refresh_continuous_aggregate('continuous_view_2', NULL, NULL); step Refresh1_sel: select * from continuous_view_1 where bkt = 0 or bkt > 30 -bkt cnt +bkt|cnt +---+--- + 0| 5 +(1 row) -0 5 step Refresh2_sel: select * from continuous_view_2 where bkt = 0 or bkt > 30 order by bkt; -bkt maxl +bkt|maxl +---+---- + 0| 4 +(1 row) -0 4 step LockMat1: BEGIN; select lock_mattable(tab) FROM ( SELECT format('%I.%I',materialization_hypertable_schema, materialization_hypertable_name) as tab from timescaledb_information.continuous_aggregates where view_name::text like 'continuous_view_1') q ; -lock_mattable +lock_mattable +------------- + +(1 row) - step I2: INSERT INTO ts_continuous_test SELECT 40, 1000 ; step Refresh1: CALL refresh_continuous_aggregate('continuous_view_1', NULL, 30); step Refresh2: CALL refresh_continuous_aggregate('continuous_view_2', NULL, NULL); @@ -101,14 +115,18 @@ step UnlockMat1: ROLLBACK; R1: NOTICE: continuous aggregate "continuous_view_1" is already up-to-date step Refresh1: <... completed> step Refresh1_sel: select * from continuous_view_1 where bkt = 0 or bkt > 30 -bkt cnt +bkt|cnt +---+--- + 0| 5 +(1 row) -0 5 step Refresh2_sel: select * from continuous_view_2 where bkt = 0 or bkt > 30 order by bkt; -bkt maxl +bkt|maxl +---+---- + 0| 4 + 40|1000 +(2 rows) -0 4 -40 1000 starting permutation: Setup2 Refresh1 Refresh2 Refresh1_sel Refresh2_sel U1 U2 LInvRow Refresh1 Refresh2 UnlockInvRow Refresh1_sel Refresh2_sel step Setup2: @@ -129,13 +147,17 @@ step Setup2: step Refresh1: CALL refresh_continuous_aggregate('continuous_view_1', NULL, 30); step Refresh2: CALL refresh_continuous_aggregate('continuous_view_2', NULL, NULL); step Refresh1_sel: select * from continuous_view_1 where bkt = 0 or bkt > 30 -bkt cnt +bkt|cnt +---+--- + 0| 5 +(1 row) -0 5 step Refresh2_sel: select * from continuous_view_2 where bkt = 0 or bkt > 30 order by bkt; -bkt maxl +bkt|maxl +---+---- + 0| 4 +(1 row) -0 4 step U1: update ts_continuous_test SET val = 5555 where time < 10; step U2: update ts_continuous_test SET val = 5 where time > 15 and time < 25; step LInvRow: BEGIN; update _timescaledb_catalog.continuous_aggs_invalidation_threshold set watermark = 20 where hypertable_id in ( select raw_hypertable_id from _timescaledb_catalog.continuous_agg where user_view_name like 'continuous_view_1' ); @@ -146,10 +168,14 @@ step UnlockInvRow: ROLLBACK; step Refresh1: <... completed> step Refresh2: <... completed> step Refresh1_sel: select * from continuous_view_1 where bkt = 0 or bkt > 30 -bkt cnt +bkt|cnt +---+--- + 0| 5 +(1 row) -0 5 step Refresh2_sel: select * from continuous_view_2 where bkt = 0 or bkt > 30 order by bkt; -bkt maxl +bkt|maxl +---+---- + 0|5555 +(1 row) -0 5555 diff --git a/tsl/test/isolation/expected/deadlock_drop_chunks_compress.out b/tsl/test/isolation/expected/deadlock_drop_chunks_compress.out index 1e81bcf5c..6d0cdc572 100644 --- a/tsl/test/isolation/expected/deadlock_drop_chunks_compress.out +++ b/tsl/test/isolation/expected/deadlock_drop_chunks_compress.out @@ -5,9 +5,11 @@ step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); -count +count +----- + 2 +(1 row) -2 step s1_commit: COMMIT; step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) @@ -26,16 +28,18 @@ step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); -count +count +----- + 2 +(1 row) -2 step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; step s1_commit: COMMIT; step s2_compress_chunk_1: <... completed> -error in steps s1_commit s2_compress_chunk_1: ERROR: chunk deleted by other transaction +ERROR: chunk deleted by other transaction step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; @@ -48,9 +52,11 @@ step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); -count +count +----- + 2 +(1 row) -2 step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; @@ -70,9 +76,11 @@ step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); -count +count +----- + 2 +(1 row) -2 step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; @@ -92,9 +100,11 @@ step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); @@ -106,9 +116,11 @@ step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s2_commit: COMMIT; starting permutation: s2_compress_chunk_1 s1_drop s2_compress_chunk_2 s1_commit s2_commit @@ -116,9 +128,11 @@ step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); @@ -127,9 +141,11 @@ step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s1_drop: <... completed> ERROR: some chunks could not be read since they are being concurrently updated step s1_commit: COMMIT; @@ -140,9 +156,11 @@ step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); @@ -151,14 +169,18 @@ step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s2_commit: COMMIT; step s1_drop: <... completed> -count +count +----- + 2 +(1 row) -2 step s1_commit: COMMIT; starting permutation: s2_compress_chunk_1 s2_compress_chunk_2 s1_drop s1_commit s2_commit @@ -166,16 +188,20 @@ step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); @@ -190,25 +216,31 @@ step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); step s2_commit: COMMIT; step s1_drop: <... completed> -count +count +----- + 2 +(1 row) -2 step s1_commit: COMMIT; starting permutation: s2_compress_chunk_1 s2_compress_chunk_2 s2_commit s1_drop s1_commit @@ -216,22 +248,28 @@ step s2_compress_chunk_1: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 ASC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s2_compress_chunk_2: SELECT count(compress_chunk(chunk)) FROM (SELECT chunk FROM chunks_to_compress ORDER BY 1 DESC LIMIT 1) AS chunk; -count +count +----- + 1 +(1 row) -1 step s2_commit: COMMIT; step s1_drop: SELECT count (*) FROM drop_chunks('conditions', older_than => '2018-12-03 00:00'::timestamptz); -count +count +----- + 2 +(1 row) -2 step s1_commit: COMMIT; diff --git a/tsl/test/isolation/expected/dist_restore_point.out b/tsl/test/isolation/expected/dist_restore_point.out index 071b3bbc9..49f87af32 100644 --- a/tsl/test/isolation/expected/dist_restore_point.out +++ b/tsl/test/isolation/expected/dist_restore_point.out @@ -1,193 +1,271 @@ Parsed test spec with 3 sessions starting permutation: s3_lock_enable s1_create_dist_rp s2_insert s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |t |t |t +(1 row) -data_node_1 localhost 55432 cdrp_1 t t t -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |t |t |t +(1 row) -data_node_2 localhost 55432 cdrp_2 t t t -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |t |t |t +(1 row) -data_node_3 localhost 55432 cdrp_3 t t t -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_insert: INSERT INTO disttable VALUES ('2019-08-02 10:45', 0, 0.0); step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_insert: <... completed> starting permutation: s2_begin s2_insert s3_lock_enable s1_create_dist_rp s3_lock_count s2_commit s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s2_begin: BEGIN; step s2_insert: INSERT INTO disttable VALUES ('2019-08-02 10:45', 0, 0.0); step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 1 +(1 row) -2 1 step s2_commit: COMMIT; step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_commit: <... completed> starting permutation: s3_lock_enable s1_create_dist_rp s2_create_dist_rp s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s2_test'); step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t starting permutation: s3_lock_enable s1_create_dist_rp s2_dist_exec s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_dist_exec: CALL distributed_exec('SELECT true;', transactional => true); step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_dist_exec: <... completed> starting permutation: s3_lock_enable s1_create_dist_rp s2_create_dist_ht s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_create_dist_ht: CREATE TABLE disttable2(time timestamptz NOT NULL, device int, temp float); @@ -197,153 +275,217 @@ step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_create_dist_ht: <... completed> -created +created +------- +t +(1 row) -t starting permutation: s3_lock_enable s1_create_dist_rp s2_drop_dist_ht s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_drop_dist_ht: DROP TABLE disttable2; step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_drop_dist_ht: <... completed> starting permutation: s3_lock_enable s1_create_dist_rp s2_add_dn s3_lock_count s3_lock_count_fs s3_lock_release s3_lock_count_fs -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_add_dn: SELECT * FROM add_data_node('data_node_4', host => 'localhost', database => 'cdrp_4'); step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 1 +(1 row) -2 1 step s3_lock_count_fs: SELECT foreign_server_locks() as foreign_server_locks; foreign_server_locks +-------------------- + 2 +(1 row) -2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +(4 rows) -t -t -t -t step s2_add_dn: <... completed> -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_4|localhost|55432|cdrp_4 |t |t |t +(1 row) -data_node_4 localhost 55432 cdrp_4 t t t step s3_lock_count_fs: SELECT foreign_server_locks() as foreign_server_locks; foreign_server_locks +-------------------- + 0 +(1 row) -0 starting permutation: s3_lock_enable s1_create_dist_rp s2_del_dn s3_lock_count s3_lock_release -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_1|localhost|55432|cdrp_1 |f |f |f +(1 row) -data_node_1 localhost 55432 cdrp_1 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_2|localhost|55432|cdrp_2 |f |f |f +(1 row) -data_node_2 localhost 55432 cdrp_2 f f f -node_name host port database node_created database_createdextension_created +node_name |host | port|database|node_created|database_created|extension_created +-----------+---------+-----+--------+------------+----------------+----------------- +data_node_3|localhost|55432|cdrp_3 |f |f |f +(1 row) -data_node_3 localhost 55432 cdrp_3 f f f -created +created +------- +t +(1 row) -t step s3_lock_enable: SELECT debug_waitpoint_enable('create_distributed_restore_point_lock'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_dist_rp: SELECT restore_point > pg_lsn('0/0') as valid_lsn FROM create_distributed_restore_point('s1_test'); step s2_del_dn: SELECT * FROM delete_data_node('data_node_4'); step s3_lock_count: SELECT waitpoint_locks('create_distributed_restore_point_lock') as cdrp_locks, remote_txn_locks() as remote_txn_locks; -cdrp_locks remote_txn_locks +cdrp_locks|remote_txn_locks +----------+---------------- + 2| 2 +(1 row) -2 2 step s3_lock_release: SELECT debug_waitpoint_release('create_distributed_restore_point_lock'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_dist_rp: <... completed> -valid_lsn +valid_lsn +--------- +t +t +t +t +t +(5 rows) -t -t -t -t -t step s2_del_dn: <... completed> delete_data_node +---------------- +t +(1 row) -t diff --git a/tsl/test/isolation/expected/remote_create_chunk.out b/tsl/test/isolation/expected/remote_create_chunk.out index 8eb031d11..8fb42b332 100644 --- a/tsl/test/isolation/expected/remote_create_chunk.out +++ b/tsl/test/isolation/expected/remote_create_chunk.out @@ -3,12 +3,16 @@ Parsed test spec with 4 sessions starting permutation: s4_wait_created s4_wait_found s1_create_chunk_1 s2_create_chunk_1 s3_conditions_locks s4_release_created s3_conditions_locks s4_release_found step s4_wait_created: SELECT debug_waitpoint_enable('find_or_create_chunk_created'); debug_waitpoint_enable +---------------------- + +(1 row) - step s4_wait_found: SELECT debug_waitpoint_enable('find_or_create_chunk_found'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_chunk_1: SELECT slices, created FROM _timescaledb_internal.create_chunk('conditions', jsonb_build_object('time', ARRAY[1514764800000000, 1514851200000000], 'device', ARRAY[-9223372036854775808, 1073741823])); @@ -21,44 +25,60 @@ step s3_conditions_locks: waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 2| 0| 1| 0 +(1 row) -2 0 1 0 step s4_release_created: SELECT debug_waitpoint_release('find_or_create_chunk_created'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_chunk_1: <... completed> -slices created +slices |created +--------------------------------------------------------------------------------------------+------- +{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}|t +(1 row) -{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}t step s3_conditions_locks: SELECT root_table_lock_count() AS table_lock, waitpoint_count('find_or_create_chunk_start') AS at_start, waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 0| 0| 0| 1 +(1 row) -0 0 0 1 step s4_release_found: SELECT debug_waitpoint_release('find_or_create_chunk_found'); debug_waitpoint_release +----------------------- + +(1 row) - step s2_create_chunk_1: <... completed> -slices created +slices |created +--------------------------------------------------------------------------------------------+------- +{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}|f +(1 row) -{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}f starting permutation: s4_wait_created s4_wait_found s1_create_chunk_1 s2_create_chunk_2 s3_conditions_locks s4_release_created s3_conditions_locks s4_release_found step s4_wait_created: SELECT debug_waitpoint_enable('find_or_create_chunk_created'); debug_waitpoint_enable +---------------------- + +(1 row) - step s4_wait_found: SELECT debug_waitpoint_enable('find_or_create_chunk_found'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_chunk_1: SELECT slices, created FROM _timescaledb_internal.create_chunk('conditions', jsonb_build_object('time', ARRAY[1514764800000000, 1514851200000000], 'device', ARRAY[-9223372036854775808, 1073741823])); @@ -71,47 +91,63 @@ step s3_conditions_locks: waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 2| 0| 1| 0 +(1 row) -2 0 1 0 step s4_release_created: SELECT debug_waitpoint_release('find_or_create_chunk_created'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_chunk_1: <... completed> -slices created +slices |created +--------------------------------------------------------------------------------------------+------- +{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}|t +(1 row) -{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}t step s2_create_chunk_2: <... completed> -slices created +slices |created +-------------------------------------------------------------------------------------------+------- +{"time": [1514764800000000, 1514851200000000], "device": [1073741823, 9223372036854775807]}|t +(1 row) -{"time": [1514764800000000, 1514851200000000], "device": [1073741823, 9223372036854775807]}t step s3_conditions_locks: SELECT root_table_lock_count() AS table_lock, waitpoint_count('find_or_create_chunk_start') AS at_start, waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 0| 0| 0| 0 +(1 row) -0 0 0 0 step s4_release_found: SELECT debug_waitpoint_release('find_or_create_chunk_found'); debug_waitpoint_release +----------------------- + +(1 row) - starting permutation: s4_wait_created s1_create_chunk_1 s4_wait_start s2_create_chunk_1 s3_conditions_locks s4_release_created s3_conditions_locks s4_release_start s3_conditions_locks step s4_wait_created: SELECT debug_waitpoint_enable('find_or_create_chunk_created'); debug_waitpoint_enable +---------------------- + +(1 row) - step s1_create_chunk_1: SELECT slices, created FROM _timescaledb_internal.create_chunk('conditions', jsonb_build_object('time', ARRAY[1514764800000000, 1514851200000000], 'device', ARRAY[-9223372036854775808, 1073741823])); step s4_wait_start: SELECT debug_waitpoint_enable('find_or_create_chunk_start'); debug_waitpoint_enable +---------------------- + +(1 row) - step s2_create_chunk_1: SELECT slices, created FROM _timescaledb_internal.create_chunk('conditions', jsonb_build_object('time', ARRAY[1514764800000000, 1514851200000000], 'device', ARRAY[-9223372036854775808, 1073741823])); @@ -121,40 +157,54 @@ step s3_conditions_locks: waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 1| 1| 1| 0 +(1 row) -1 1 1 0 step s4_release_created: SELECT debug_waitpoint_release('find_or_create_chunk_created'); debug_waitpoint_release +----------------------- + +(1 row) - step s1_create_chunk_1: <... completed> -slices created +slices |created +--------------------------------------------------------------------------------------------+------- +{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}|t +(1 row) -{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}t step s3_conditions_locks: SELECT root_table_lock_count() AS table_lock, waitpoint_count('find_or_create_chunk_start') AS at_start, waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 0| 1| 0| 0 +(1 row) -0 1 0 0 step s4_release_start: SELECT debug_waitpoint_release('find_or_create_chunk_start'); debug_waitpoint_release +----------------------- + +(1 row) - step s2_create_chunk_1: <... completed> -slices created +slices |created +--------------------------------------------------------------------------------------------+------- +{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}|f +(1 row) -{"time": [1514764800000000, 1514851200000000], "device": [-9223372036854775808, 1073741823]}f step s3_conditions_locks: SELECT root_table_lock_count() AS table_lock, waitpoint_count('find_or_create_chunk_start') AS at_start, waitpoint_count('find_or_create_chunk_created') AS at_created, waitpoint_count('find_or_create_chunk_found') AS at_found; -table_lock at_start at_created at_found +table_lock|at_start|at_created|at_found +----------+--------+----------+-------- + 0| 0| 0| 0 +(1 row) -0 0 0 0 diff --git a/tsl/test/isolation/expected/reorder_deadlock.out b/tsl/test/isolation/expected/reorder_deadlock.out index 278cbc251..dde2981de 100644 --- a/tsl/test/isolation/expected/reorder_deadlock.out +++ b/tsl/test/isolation/expected/reorder_deadlock.out @@ -2,36 +2,44 @@ Parsed test spec with 3 sessions starting permutation: S1 R1 Bc S2 Rc Sc step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step Bc: ROLLBACK; step S2: INSERT INTO ts_reorder_test VALUES (1, 23.4, 1); +ERROR: deadlock detected step R1: <... completed> reorder_chunk_i - +--------------- -error in steps S2 R1: ERROR: deadlock detected +(1 row) + step Rc: COMMIT; step Sc: COMMIT; starting permutation: S1 R1 Bc S2 Sc Rc step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step Bc: ROLLBACK; step S2: INSERT INTO ts_reorder_test VALUES (1, 23.4, 1); +ERROR: deadlock detected step R1: <... completed> reorder_chunk_i - +--------------- -error in steps S2 R1: ERROR: deadlock detected +(1 row) + step Sc: COMMIT; step Rc: COMMIT; diff --git a/tsl/test/isolation/expected/reorder_vs_insert.out b/tsl/test/isolation/expected/reorder_vs_insert.out index 80e5fee20..e0e6634a4 100644 --- a/tsl/test/isolation/expected/reorder_vs_insert.out +++ b/tsl/test/isolation/expected/reorder_vs_insert.out @@ -6,8 +6,10 @@ step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); step Ic: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; starting permutation: Bc I1 R1 Ic Rc @@ -17,8 +19,10 @@ step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), step Ic: COMMIT; step R1: <... completed> reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; starting permutation: Bc I1 R1 Rc Ic @@ -34,8 +38,10 @@ starting permutation: Bc R1 Rc I1 Ic step Bc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); step Ic: COMMIT; @@ -44,8 +50,10 @@ starting permutation: Bc R1 I1 Rc Ic step Bc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); step Rc: COMMIT; step I1: <... completed> @@ -55,8 +63,10 @@ starting permutation: Bc R1 I1 Ic Rc step Bc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); step I1: <... completed> ERROR: canceling statement due to lock timeout @@ -68,7 +78,7 @@ step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); step I1: <... completed> step R1: <... completed> -error in steps I1 R1: ERROR: canceling statement due to lock timeout +ERROR: canceling statement due to lock timeout step Ic: COMMIT; step Bc: COMMIT; step Rc: COMMIT; @@ -79,8 +89,10 @@ step I1: INSERT INTO ts_reorder_test VALUES (1, 19.5, 3); step Bc: COMMIT; step R1: <... completed> reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; step I1: <... completed> step Ic: COMMIT; diff --git a/tsl/test/isolation/expected/reorder_vs_insert_other_chunk.out b/tsl/test/isolation/expected/reorder_vs_insert_other_chunk.out index c248ec7bd..21f5ff384 100644 --- a/tsl/test/isolation/expected/reorder_vs_insert_other_chunk.out +++ b/tsl/test/isolation/expected/reorder_vs_insert_other_chunk.out @@ -5,16 +5,20 @@ step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3); step Ic: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; starting permutation: I1 R1 Ic Rc step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3); step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx'); reorder_chunk_i - +--------------- +(1 row) + step Ic: COMMIT; step Rc: COMMIT; @@ -22,16 +26,20 @@ starting permutation: I1 R1 Rc Ic step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3); step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; step Ic: COMMIT; starting permutation: R1 I1 Ic Rc step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx'); reorder_chunk_i - +--------------- +(1 row) + step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3); step Ic: COMMIT; step Rc: COMMIT; @@ -39,8 +47,10 @@ step Rc: COMMIT; starting permutation: R1 I1 Rc Ic step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx'); reorder_chunk_i - +--------------- +(1 row) + step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3); step Rc: COMMIT; step Ic: COMMIT; @@ -48,8 +58,10 @@ step Ic: COMMIT; starting permutation: R1 Rc I1 Ic step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; step I1: INSERT INTO ts_reorder_test VALUES (11, 19.5, 3); step Ic: COMMIT; diff --git a/tsl/test/isolation/expected/reorder_vs_select.out b/tsl/test/isolation/expected/reorder_vs_select.out index 837698f1e..b453115b3 100644 --- a/tsl/test/isolation/expected/reorder_vs_select.out +++ b/tsl/test/isolation/expected/reorder_vs_select.out @@ -3,42 +3,52 @@ Parsed test spec with 3 sessions starting permutation: Bc S1 Sc R1 Rc step Bc: COMMIT; step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step Sc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; starting permutation: Bc S1 R1 Sc Rc step Bc: COMMIT; step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step Sc: COMMIT; step R1: <... completed> reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; starting permutation: Bc S1 R1 Rc Sc step Bc: COMMIT; step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step R1: <... completed> ERROR: canceling statement due to lock timeout @@ -49,39 +59,49 @@ starting permutation: Bc R1 Rc S1 Sc step Bc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step Sc: COMMIT; starting permutation: Bc R1 S1 Rc Sc step Bc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step S1: SELECT * FROM ts_reorder_test; step Rc: COMMIT; step S1: <... completed> -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step Sc: COMMIT; starting permutation: Bc R1 S1 Sc Rc step Bc: COMMIT; step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); reorder_chunk_i - +--------------- +(1 row) + step S1: SELECT * FROM ts_reorder_test; step S1: <... completed> ERROR: canceling statement due to lock timeout @@ -91,11 +111,13 @@ step Rc: COMMIT; starting permutation: R1 S1 Bc Rc Sc step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step Bc: COMMIT; step R1: <... completed> ERROR: canceling statement due to lock timeout @@ -104,11 +126,13 @@ step Sc: COMMIT; starting permutation: S1 R1 Bc Rc Sc step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step Bc: COMMIT; step R1: <... completed> @@ -119,31 +143,39 @@ step Sc: COMMIT; starting permutation: R1 S1 Sc Bc Rc step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step Sc: COMMIT; step Bc: COMMIT; step R1: <... completed> reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT; starting permutation: S1 R1 Sc Bc Rc step S1: SELECT * FROM ts_reorder_test; -time temp location +time|temp|location +----+----+-------- + 1|23.4| 1 + 11|21.3| 2 + 21|19.5| 3 +(3 rows) -1 23.4 1 -11 21.3 2 -21 19.5 3 step R1: SELECT reorder_chunk_i((SELECT show_chunks('ts_reorder_test') LIMIT 1), 'ts_reorder_test_time_idx', wait_on => 'waiter'); step Sc: COMMIT; step Bc: COMMIT; step R1: <... completed> reorder_chunk_i - +--------------- +(1 row) + step Rc: COMMIT;