Re: [HACKERS] Interval for launching the table sync worker - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: [HACKERS] Interval for launching the table sync worker
Date
Msg-id 7b19c700-8883-6fd3-d31a-2290fad61b5f@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Interval for launching the table sync worker  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Interval for launching the table sync worker  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 18/04/17 16:22, Peter Eisentraut wrote:
> On 4/13/17 06:23, Masahiko Sawada wrote:
>> Attached the latest patch. It didn't actually necessary to change
>> GetSubscriptionNotReadyRelations. I just changed the logic refreshing
>> the sync table state list.
> 
> I think this was the right direction, but then I got worried about
> having a loop within a loop to copy over the last start times.  If you
> have very many tables, that could be a big nested loop.
> 
> Here is an alternative proposal to store the last start times in a hash
> table.
> 

Hmm if we create hashtable for this, I'd say create hashtable for the
whole table_states then. The reason why it's list now was that it seemed
unnecessary to have hashtable when it will be empty almost always but
there is no need to have both hashtable + list IMHO.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] identity columns
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Logical replication launcher useswal_retrieve_retry_interval