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 f64d87d1-bef3-5e3e-a999-ba302816a0ee@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
List pgsql-hackers
On 18/04/17 18:14, Peter Eisentraut wrote:
> On 4/18/17 11:59, Petr Jelinek wrote:
>> 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.
> 
> The difference is that we blow away the list of states when the catalog
> changes, but we keep the hash table with the start times around.  We
> need two things with different life times.
> 

Why can't we just update the hashtable based on the catalog? I mean once
the record is not needed in the list, the table has been synced so there
is no need for the timestamp either since we'll not try to start the
worker again.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Why does logical replication launcher set application_name?
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Why does logical replication launcher setapplication_name?