On 4/12/17 00:48, Masahiko Sawada wrote: > On Wed, Apr 12, 2017 at 1:28 PM, Peter Eisentraut >> Perhaps instead of a global last_start_time, we store a per relation >> last_start_time in SubscriptionRelState? > > I was thinking the same. But a problem is that the list of > SubscriptionRelState is refreshed whenever the syncing table state > becomes invalid (table_state_valid = false). I guess we need to > improve these logic including GetSubscriptionNotReadyRelations().
The table states are invalidated on a syscache callback from pg_subscription_rel, which happens roughly speaking when a table finishes the initial sync. So if we're worried about failing tablesync workers relaunching to quickly, this would only be a problem if a tablesync of another table finishes right in that restart window. That doesn't seem a terrible issue to me. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers