Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-15 Thread Peter Eisentraut
On 12/15/16 3:46 AM, Petr Jelinek wrote: >>> Okay in case we decide it's the right way to go attached patch does >>> that. I also added some more tests based on your feedback while I am at it. >> >> This looks mostly reasonable to me, but the location and xid output from >> pg_logical_slot_get_chan

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-15 Thread Petr Jelinek
On 14/12/16 15:35, Peter Eisentraut wrote: > On 12/12/16 8:28 PM, Petr Jelinek wrote: >> On 13/12/16 02:00, Andres Freund wrote: >>> On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: I mentioned that as possible solution upthread, I am only worried that the failure scenario is basically i

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-14 Thread Peter Eisentraut
On 12/12/16 8:28 PM, Petr Jelinek wrote: > On 13/12/16 02:00, Andres Freund wrote: >> On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: >>> I mentioned that as possible solution upthread, I am only worried that >>> the failure scenario is basically infinite loop. >> >> I don't see the problem with

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Petr Jelinek
On 13/12/16 02:00, Andres Freund wrote: > On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: >> I mentioned that as possible solution upthread, I am only worried that >> the failure scenario is basically infinite loop. > > I don't see the problem with that. If you're really concerned you can > set

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Petr Jelinek
On 13/12/16 02:08, Tom Lane wrote: > Andres Freund writes: >> On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: >>> I mentioned that as possible solution upthread, I am only worried that >>> the failure scenario is basically infinite loop. > >> I don't see the problem with that. If you're really

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Andres Freund
On 2016-12-12 20:08:01 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: > >> I mentioned that as possible solution upthread, I am only worried that > >> the failure scenario is basically infinite loop. > > > I don't see the problem with that. If

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Tom Lane
Andres Freund writes: > On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: >> I mentioned that as possible solution upthread, I am only worried that >> the failure scenario is basically infinite loop. > I don't see the problem with that. If you're really concerned you can > set a statement timeout

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Andres Freund
On 2016-12-13 01:57:01 +0100, Petr Jelinek wrote: > I mentioned that as possible solution upthread, I am only worried that > the failure scenario is basically infinite loop. I don't see the problem with that. If you're really concerned you can set a statement timeout. Andres -- Sent via pgsql-

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Petr Jelinek
On 13/12/16 01:49, Andres Freund wrote: > On 2016-12-13 01:42:48 +0100, Petr Jelinek wrote: >> On 13/12/16 01:40, Tom Lane wrote: >>> Petr Jelinek writes: On 13/12/16 00:39, Tom Lane wrote: > Hm, buildfarm says this didn't fix it. Where exactly does the dropping > of the slot happen

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Andres Freund
On 2016-12-13 01:42:48 +0100, Petr Jelinek wrote: > On 13/12/16 01:40, Tom Lane wrote: > > Petr Jelinek writes: > >> On 13/12/16 00:39, Tom Lane wrote: > >>> Hm, buildfarm says this didn't fix it. Where exactly does the dropping > >>> of the slot happen ... is it not complete by the time the back

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Andres Freund
On 2016-12-12 19:40:37 -0500, Tom Lane wrote: > Petr Jelinek writes: > > Yes, I've seen. The cleanup of slots is done in ProcKill(), I wonder, > > since it's on_shmem_exit hook, and the pgstat_beshutdown_hook is as > > well, maybe the pgstat_beshutdown_hook is called before ProcKill and the > > qu

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Petr Jelinek
On 13/12/16 01:40, Tom Lane wrote: > Petr Jelinek writes: >> On 13/12/16 00:39, Tom Lane wrote: >>> Hm, buildfarm says this didn't fix it. Where exactly does the dropping >>> of the slot happen ... is it not complete by the time the backend exits? > >> Yes, I've seen. The cleanup of slots is don

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Tom Lane
Petr Jelinek writes: > On 13/12/16 00:39, Tom Lane wrote: >> Hm, buildfarm says this didn't fix it. Where exactly does the dropping >> of the slot happen ... is it not complete by the time the backend exits? > Yes, I've seen. The cleanup of slots is done in ProcKill(), I wonder, > since it's on_

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Petr Jelinek
On 13/12/16 00:39, Tom Lane wrote: > I wrote: >> Petr Jelinek writes: >>> Attached is the fixed test using the loop from test_extensions (and yes >>> I would have missed the pg_stat_clear_snapshot() call without the hint, >>> thanks :) ). > >> Pushed, thanks. > > Hm, buildfarm says this didn't f

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Tom Lane
I wrote: > Petr Jelinek writes: >> Attached is the fixed test using the loop from test_extensions (and yes >> I would have missed the pg_stat_clear_snapshot() call without the hint, >> thanks :) ). > Pushed, thanks. Hm, buildfarm says this didn't fix it. Where exactly does the dropping of the s

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Tom Lane
Petr Jelinek writes: > Yes you are correct, we tried naively to first drop another slot in > hopes that it will give the other backend enough time to close, but > apparently that wasn't robust enough for slower machines. > Attached is the fixed test using the loop from test_extensions (and yes >

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Petr Jelinek
On 12/12/16 16:55, Tom Lane wrote: > I wrote: >> Peter Eisentraut writes: >>> Add support for temporary replication slots > >> Some of the slower buildfarm members are failing test-decoding-check since >> this went in. At least on prairiedog, it looks like a race condition in >> the test: > >

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> Add support for temporary replication slots > Some of the slower buildfarm members are failing test-decoding-check since > this went in. At least on prairiedog, it looks like a race condition in > the test: Having now looked a bit more closely, that's almo

Re: [COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Tom Lane
Peter Eisentraut writes: > Add support for temporary replication slots Some of the slower buildfarm members are failing test-decoding-check since this went in. At least on prairiedog, it looks like a race condition in the test: ** /Users/buildfarm/bf-data/HEAD/pgsql.build/contrib/test_decoding

[COMMITTERS] pgsql: Add support for temporary replication slots

2016-12-12 Thread Peter Eisentraut
Add support for temporary replication slots This allows creating temporary replication slots that are removed automatically at the end of the session or on error. From: Petr Jelinek Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/a924c327e2793d2025b19e18de7917110dc