Re: pgsql: Add support for temporary replication slots

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add support for temporary replication slots
Date: 2016-12-12 18:47:53
Message-ID: 62935e6f-4f1b-c433-e0fa-7f936a38b3e5@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 12/12/16 16:55, Tom Lane wrote:
> I wrote:
>> Peter Eisentraut <peter_e(at)gmx(dot)net> 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 almost certainly what it is:
> the test is assuming that the old backend exits instantaneously, which
> it doesn't. You might want to borrow the wait-for-previous-session-to-die
> loop I put into src/test/modules/test_extensions/sql/test_extensions.sql
> recently. (Make sure you get the fixed version ;-))
>

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
I would have missed the pg_stat_clear_snapshot() call without the hint,
thanks :) ).

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

Attachment Content-Type Size
0001-Fix-the-test_decoding-slot-test-race-condition.patch application/x-patch 3.0 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-12 18:49:12 pgsql: doc: Fix purported type of pg_am.amhandler to match reality.
Previous Message Tom Lane 2016-12-12 18:32:32 pgsql: Make the different Unix-y semaphore implementations ABI-compatib

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-12 18:49:26 Re: Typo in doc/src/sgml/catalogs.sgml
Previous Message Robert Haas 2016-12-12 18:41:51 Re: Proposal : Parallel Merge Join