Re: [HACKERS] Changeset Extraction v7.1

2014-01-27 Thread Robert Haas
On Sat, Jan 25, 2014 at 5:25 PM, Andres Freund and...@2ndquadrant.com wrote: Looking over patch 0002, I see that there's code to allow a walsender to create or drop a physical replication slot. Also, if we've acquired a replication slot, there's code to update it, and code to make sure we

Re: [HACKERS] Changeset Extraction v7.1

2014-01-27 Thread Robert Haas
On Sat, Jan 25, 2014 at 5:25 PM, Andres Freund and...@2ndquadrant.com wrote: I'm also wondering about whether we've got the right naming here. AFAICT, it's not the case that we're going to use the catalog xmin for catalogs and the data xmin for non-catalogs. Rather, the catalog xmin is going

Re: [HACKERS] Changeset Extraction v7.1

2014-01-25 Thread Andres Freund
Hi Robert, all, On 2014-01-24 20:38:11 -0500, Robert Haas wrote: On Fri, Jan 24, 2014 at 12:49 PM, Andres Freund and...@2ndquadrant.com wrote: But this code is riddled with places where you track a catalog xmin and a data xmin separately. The only point of doing it that way is to

Re: [HACKERS] Changeset Extraction v7.1

2014-01-24 Thread Robert Haas
On Thu, Jan 23, 2014 at 6:32 PM, Andres Freund and...@2ndquadrant.com wrote: I also wonder if we should use the terminology attach instead of acquire; that pairs more naturally with release. Then the message, if we want more than an assert, might be this backend is already attached to a

Re: [HACKERS] Changeset Extraction v7.1

2014-01-24 Thread Andres Freund
On 2014-01-24 12:10:50 -0500, Robert Haas wrote: Unfortunately not. Inside the walsender there's currently no LWLockReleaseAll() for ERRORs since commands aren't run inside a transaction command... But maybe I should have fixed this by adding the release to WalSndErrorCleanup()

Re: [HACKERS] Changeset Extraction v7.1

2014-01-24 Thread Robert Haas
On Fri, Jan 24, 2014 at 12:49 PM, Andres Freund and...@2ndquadrant.com wrote: But this code is riddled with places where you track a catalog xmin and a data xmin separately. The only point of doing it that way is to support a division that hasn't been made yet. If you think it will make

Re: [HACKERS] Changeset Extraction v7.1

2014-01-23 Thread Robert Haas
Patch 0001: +errmsg(could not find free replication slot), Suggest: all replication slots are in use + elog(ERROR, cannot aquire a slot while another slot has been acquired); Suggest: this backend has already acquired a replication slot Or demote

Re: [HACKERS] Changeset Extraction v7.1

2014-01-23 Thread Alvaro Herrera
I wonder if it wouldn't be better to get rid of the subdirectories for the individual slots, and just have a file pg_replslot/$SLOTNAME, or not. I know there are later patches that need subdirectories for their own private data, but they could just create pg_replslot/$SLOTNAME.dir and put

Re: [HACKERS] Changeset Extraction v7.1

2014-01-23 Thread Andres Freund
Hi, On 2014-01-23 16:04:10 -0500, Robert Haas wrote: Patch 0001: +errmsg(could not find free replication slot), Suggest: all replication slots are in use That sounds better indeed. + elog(ERROR, cannot aquire a slot while another slot has