Re: Replication identifiers, take 4

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Steve Singer <steve(at)ssinger(dot)info>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replication identifiers, take 4
Date: 2015-04-22 08:17:50
Message-ID: 5537592E.50507@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21/04/15 22:36, Andres Freund wrote:
> On 2015-04-21 16:26:08 -0400, Robert Haas wrote:
>> On Tue, Apr 21, 2015 at 8:08 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>> I've now named the functions:
>>>
>>> * pg_replication_origin_create
>>> * pg_replication_origin_drop
>>> * pg_replication_origin_get (map from name to id)
>>> * pg_replication_progress_setup_origin : configure session to replicate
>>> from a specific origin
>>> * pg_replication_progress_reset_origin
>>> * pg_replication_progress_setup_tx_details : configure per transaction
>>> details (LSN and timestamp currently)
>>> * pg_replication_progress_is_replaying : Is a origin configured for the session
>>> * pg_replication_progress_advance : "manually" set the replication
>>> progress to a value. Primarily useful for copying values from other
>>> systems and such.
>>> * pg_replication_progress_get : How far did replay progress for a
>>> certain origin
>>> * pg_get_replication_progress : SRF returning the replay progress for
>>> all origin.
>>>
>>> Any comments?
>>
>> Why are we using functions for this rather than DDL?
>
> Unless I miss something the only two we really could use ddl for is
> pg_replication_origin_create/pg_replication_origin_drop. We could use
> DDL for them if we really want, but I'm not really seeing the advantage.
>

I think the only value of having DDL for this would be consistency
(catalog objects are created via DDL) as it looks like something that
will be called only by extensions and not users during normal operation.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2015-04-22 10:28:04 Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Previous Message Heikki Linnakangas 2015-04-22 08:14:08 Re: Improve sleep processing of pg_rewind TAP tests