From ssinger at ca.afilias.info Sun Jul 6 12:05:43 2014 From: ssinger at ca.afilias.info (Steve Singer) Date: Sun, 06 Jul 2014 15:05:43 -0400 Subject: [Slony1-hackers] initial setsync value Message-ID: <53B99E07.2000807@ca.afilias.info> In the copy_set function in the slon remote_worker when we copy the set from the origin we construct values for the initial snapshot (for sl_setsync) by the following method * Get the max SYNC event on the origin and snapshot information for that sync * Query all sl_log_1 and sl_log_2 entires that came in after that sync. This information populates the action list. Why don't we just get the snapshot visibility information of what is and isn't visible to the copy_set transaction directly with txid_current_snapshot() ? It seems simpler? (I would guess that this is a left-over from the pre-8.3 days when txid_current_snapshot wasn't available?) I ask because the current method work with logical replication because sl_log will be empty (but we still need the snapshot of the copy_set to filter stuff out later). I'd like to modify copy_set to just use txid_current_snapshot for both logical and trigger based cases. If there some reason why this won't work then please let me know. Thanks From jan at wi3ck.info Sun Jul 6 12:48:59 2014 From: jan at wi3ck.info (Jan Wieck) Date: Sun, 6 Jul 2014 15:48:59 -0400 Subject: [Slony1-hackers] initial setsync value In-Reply-To: <53B99E07.2000807@ca.afilias.info> References: <53B99E07.2000807@ca.afilias.info> Message-ID: Wasn't that precisely one of our TODO items? I actually thought we did this for 2.2 already, but the code shows otherwise. Jan -- Jan Wieck Senior Software Engineer http://slony.info On Jul 6, 2014 3:05 PM, "Steve Singer" wrote: > In the copy_set function in the slon remote_worker when we copy the set > from the origin we construct values for the initial snapshot (for > sl_setsync) by the following method > > * Get the max SYNC event on the origin and snapshot information for that > sync > * Query all sl_log_1 and sl_log_2 entires that came in after that sync. > This information populates the action list. > > Why don't we just get the snapshot visibility information of what is and > isn't visible to the copy_set transaction directly with > txid_current_snapshot() ? > > It seems simpler? (I would guess that this is a left-over from the > pre-8.3 days when txid_current_snapshot wasn't available?) > > I ask because the current method work with logical replication because > sl_log will be empty (but we still need the snapshot of the copy_set to > filter stuff out later). I'd like to modify copy_set to just use > txid_current_snapshot for both logical and trigger based cases. > > If there some reason why this won't work then please let me know. > > Thanks > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.slony.info/pipermail/slony1-hackers/attachments/20140706/1ebbbf8d/attachment.htm