mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 02:23:49 +08:00
In high availability setups, a streaming replica of the access node can be configured. Since it's a hot standby users should be able to run read-only queries from this replica and should be able to query the distributed hypertables from it. Additionally, the internal code which sets up a connection from the standby access node to the data nodes now marks the ongoing transaction explicitly as READ ONLY ones. This ensures that any functions or any activity which tries to make modifications on the data nodes errors out. Note that even if "timescaledb.enable_2pc" is enabled, we will still use 1PC for these READ ONLY transactions. While we are doing this, we also handle the case when a user explicitly marks a transaction as "READ ONLY" on the primary AN. Even in that case the connection to the DNs will be marked read only. Additionally, similar to the above standby case, even if "timescaledb.enable_2pc" is enabled, we will still use 1PC for these READ ONLY transactions on the primary AN. In normal Postgres standby, the ongoing transaction becomes READ WRITE immediately on promotion whereas in our case the ongoing transaction will remain READ ONLY till completion. New transactions on the same session will be READ WRITE as expected.
11 lines
405 B
CMake
11 lines
405 B
CMake
set(PROVE_TEST_FILES 001_simple_multinode.pl 003_connections.pl)
|
|
set(PROVE_DEBUG_TEST_FILES 002_chunk_copy_move.pl 004_multinode_rdwr_1pc.pl)
|
|
|
|
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
list(APPEND PROVE_TEST_FILES ${PROVE_DEBUG_TEST_FILES})
|
|
endif(CMAKE_BUILD_TYPE MATCHES Debug)
|
|
|
|
foreach(P_FILE ${PROVE_TEST_FILES})
|
|
configure_file(${P_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${P_FILE} COPYONLY)
|
|
endforeach(P_FILE)
|