Re: Proposal: Generic WAL logical messages

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Craig Ringer <craig(at)2ndquadrant(dot)com>,Petr Jelinek <petr(at)2ndquadrant(dot)com>,Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>,Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,Artur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru>
Subject: Re: Proposal: Generic WAL logical messages
Date: 2016-04-07 04:18:27
Message-ID: 14046B74-A140-4480-BC01-E72AFC95FBCE@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On April 7, 2016 2:26:41 AM GMT+02:00, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
>On Thu, Apr 7, 2016 at 12:55 AM, Andres Freund <andres(at)anarazel(dot)de>
>wrote:
>> On 2016-04-06 16:49:17 +0100, Simon Riggs wrote:
>>> Perhaps easy to solve, but how do we test it is solved?
>>
>> Maybe something like
>>
>> -- drain
>> pg_logical_slot_get_changes(...);
>> -- generate message in different database, to ensure it's not
>processed
>> -- in this database
>> \c template1
>> SELECT pg_logical_emit_message(...);
>> \c postgres
>> -- check
>> pg_logical_slot_get_changes(..);
>>
>> It's a bit ugly to hardcode database names :/
>
>When running installcheck, there is no way to be sure that databases
>template1 and/or postgres exist on a server, so this test would fail
>because of that.

No need to hardcode postgres, see Petr's reply. I'm not concerned about template 1 not being there -if you tinkered with things in that level it's unlikely that tests will succeed. Also, remember, this is in a test cluster created by the regression script, and there's no installcheck support anyway (because of the required settings for logical decoding) anyway
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2016-04-07 04:22:43 Re: Support for N synchronous standby servers - take 2
Previous Message Amit Kapila 2016-04-07 03:44:00 Re: Speed up Clog Access by increasing CLOG buffers