diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-04-27 14:57:26 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-04-28 13:47:46 -0400 |
commit | e3cf708016ca6045dc1cd5a0768cfecf17caf3d1 (patch) | |
tree | 17a1354e2fef5dea53672215fa45459ea7c839a0 /src/backend/parser/parse_utilcmd.c | |
parent | d981074c24d2f1e4f44bc6d80e967e523ce64f50 (diff) | |
download | postgresql-e3cf708016ca6045dc1cd5a0768cfecf17caf3d1.tar.gz postgresql-e3cf708016ca6045dc1cd5a0768cfecf17caf3d1.zip |
Wait between tablesync worker restarts
Before restarting a tablesync worker for the same relation, wait
wal_retrieve_retry_interval (currently 5s by default). This avoids
restarting failing workers in a tight loop.
We keep the last start times in a hash table last_start_times that is
separate from the table_states list, because that list is cleared out on
syscache invalidation, which happens whenever a table finishes syncing.
The hash table is kept until all tables have finished syncing.
A future project might be to unify these two and keep everything in one
data structure, but for now this is a less invasive change to accomplish
the original purpose.
For the test suite, set wal_retrieve_retry_interval to its minimum
value, to not increase the test suite run time.
Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions