Re: [HACKERS] Few observations in replication slots related code

2014-06-13 Thread Amit Kapila
On Thu, Jun 12, 2014 at 12:45 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-12 08:55:59 +0530, Amit Kapila wrote: Function pg_create_logical_replication_slot() is trying to save slot twice once during CreateInitDecodingContext() and then in ReplicationSlotPersist(), isn't it

Re: [HACKERS] Few observations in replication slots related code

2014-06-13 Thread Andres Freund
On 2014-06-13 13:01:59 +0530, Amit Kapila wrote: On Thu, Jun 12, 2014 at 12:45 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-12 08:55:59 +0530, Amit Kapila wrote: Function pg_create_logical_replication_slot() is trying to save slot twice once during

Re: [HACKERS] Few observations in replication slots related code

2014-06-13 Thread Amit Kapila
On Fri, Jun 13, 2014 at 1:45 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-13 13:01:59 +0530, Amit Kapila wrote: Okay, but if it crashes before saving the persistency to permanent file and there remains a .tmp for this replication slot which it created during save of this

Re: [HACKERS] Few observations in replication slots related code

2014-06-13 Thread Andres Freund
On 2014-06-13 14:21:33 +0530, Amit Kapila wrote: On Fri, Jun 13, 2014 at 1:45 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-13 13:01:59 +0530, Amit Kapila wrote: Okay, but if it crashes before saving the persistency to permanent file and there remains a .tmp for this

Re: [HACKERS] Few observations in replication slots related code

2014-06-12 Thread Andres Freund
Hi Amit, On 2014-06-12 08:55:59 +0530, Amit Kapila wrote: 1. In function StartupReplicationSlots(XLogRecPtr checkPointRedo), parameter checkPointRedo is not used. It used to be included in a debug message. Apparently the message was removed at some point (don't remember it, but I have a memory

Re: [HACKERS] Few observations in replication slots related code

2014-06-12 Thread Andres Freund
Hi, On 2014-06-12 09:15:08 +0200, Andres Freund wrote: 6. elog(ERROR, cannot handle changeset extraction yet); Shouldn't it be better to use logical replication instead of changeset extraction? Will change. I don't see that message anywhere in current code? All of those were

Re: [HACKERS] Few observations in replication slots related code

2014-06-12 Thread Amit Kapila
On Thu, Jun 12, 2014 at 5:02 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-06-12 09:15:08 +0200, Andres Freund wrote: 6. elog(ERROR, cannot handle changeset extraction yet); Shouldn't it be better to use logical replication instead of changeset extraction? Will

[HACKERS] Few observations in replication slots related code

2014-06-11 Thread Amit Kapila
Few observations in Replication slots related code: 1. In function StartupReplicationSlots(XLogRecPtr checkPointRedo), parameter checkPointRedo is not used. 2. Few check are in different order in functions pg_create_physical_replication_slot() and pg_create_logical_replication_slot(). if