Re: replication slot restart_lsn initialization

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, "Duran, Danilo" <danilod(at)amazon(dot)com>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: replication slot restart_lsn initialization
Date: 2015-09-06 11:32:15
Message-ID: 20150906113215.GB7137@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-08-15 21:16:11 +0900, Michael Paquier wrote:
> Well, this has taken less time than I thought:
> =# CREATE_REPLICATION_SLOT toto PHYSICAL;
> slot_name | consistent_point | snapshot_name | output_plugin
> -----------+------------------+---------------+---------------
> toto | 0/0 | null | null
> (1 row)
> =# CREATE_REPLICATION_SLOT toto2 PHYSICAL RESERVE_WAL;
> slot_name | consistent_point | snapshot_name | output_plugin
> -----------+------------------+---------------+---------------
> toto2 | 0/0 | null | null
> (1 row)

Independently I wonder if it's worth splitting the returned columns for
physical/logical slots.

> + <varlistentry>
> + <term><literal>RESERVE_WAL</></term>
> + <listitem>
> + <para>
> + Specify that the <acronym>LSN</> for this physical replication
> + slot is reserved immediately; otherwise the <acronym>LSN</> is
> + reserved on first connection from a streaming replication client.
> + </para>
> + </listitem>

I replaced LSN with WAL here - it's not LSNs that are reserved.

> +opt_reserve_wal:
> + K_RESERVE_WAL
> + { $$ = TRUE }
> + | /* EMPTY */
> + { $$ = FALSE }
> +

I felt free to add semicolons here ;)

Committed, thanks for the patch.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message andres@anarazel.de 2015-09-06 11:36:34 Re: [PATCH] Refactoring of LWLock tranches
Previous Message dinesh kumar 2015-09-06 11:19:44 Re: [PATCH] SQL function to report log message