mirror of https://github.com/postgres/postgres
When implementing a replication solution ontop of logical decoding, two
related problems exist:
* How to safely keep track of replication progress
* How to change replication behavior, based on the origin of a row;
e.g. to avoid loops in bi-directional replication setups
The solution to these problems, as implemented here, consist out of
three parts:
1) 'replication origins', which identify nodes in a replication setup.
2) 'replication progress tracking', which remembers, for each
replication origin, how far replay has progressed in a efficient and
crash safe manner.
3) The ability to filter out changes performed on the behest of a
replication origin during logical decoding; this allows complex
replication topologies. E.g. by filtering all replayed changes out.
Most of this could also be implemented in "userspace", e.g. by inserting
additional rows contain origin information, but that ends up being much
less efficient and more complicated. We don't want to require various
replication solutions to reimplement logic for this independently. The
infrastructure is intended to be generic enough to be reusable.
This infrastructure also replaces the 'nodeid' infrastructure of commit
timestamps. It is intended to provide all the former capabilities,
except that there's only 2^16 different origins; but now they integrate
with logical decoding. Additionally more functionality is accessible via
SQL. Since the commit timestamp infrastructure has also been introduced
in 9.5 (commit 73c986add
) changing the API is not a problem.
For now the number of origins for which the replication progress can be
tracked simultaneously is determined by the max_replication_slots
GUC. That GUC is not a perfect match to configure this, but there
doesn't seem to be sufficient reason to introduce a separate new one.
Bumps both catversion and wal page magic.
Author: Andres Freund, with contributions from Petr Jelinek and Craig Ringer
Reviewed-By: Heikki Linnakangas, Petr Jelinek, Robert Haas, Steve Singer
Discussion: 20150216002155.GI15326@awork2.anarazel.de,
20140923182422.GA15776@alap3.anarazel.de,
20131114172632.GE7522@alap2.anarazel.de
pull/14/head
parent
c6e96a2f98
commit
5aa2350426
@ -0,0 +1,141 @@ |
||||
-- predictability |
||||
SET synchronous_commit = on; |
||||
CREATE TABLE origin_tbl(id serial primary key, data text); |
||||
CREATE TABLE target_tbl(id serial primary key, data text); |
||||
SELECT pg_replication_origin_create('test_decoding: regression_slot'); |
||||
pg_replication_origin_create |
||||
------------------------------ |
||||
1 |
||||
(1 row) |
||||
|
||||
-- ensure duplicate creations fail |
||||
SELECT pg_replication_origin_create('test_decoding: regression_slot'); |
||||
ERROR: duplicate key value violates unique constraint "pg_replication_origin_roname_index" |
||||
DETAIL: Key (roname)=(test_decoding: regression_slot) already exists. |
||||
--ensure deletions work (once) |
||||
SELECT pg_replication_origin_create('test_decoding: temp'); |
||||
pg_replication_origin_create |
||||
------------------------------ |
||||
2 |
||||
(1 row) |
||||
|
||||
SELECT pg_replication_origin_drop('test_decoding: temp'); |
||||
pg_replication_origin_drop |
||||
---------------------------- |
||||
|
||||
(1 row) |
||||
|
||||
SELECT pg_replication_origin_drop('test_decoding: temp'); |
||||
ERROR: cache lookup failed for replication origin 'test_decoding: temp' |
||||
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding'); |
||||
?column? |
||||
---------- |
||||
init |
||||
(1 row) |
||||
|
||||
-- origin tx |
||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated and decoded and decoded again'); |
||||
INSERT INTO target_tbl(data) |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); |
||||
-- as is normal, the insert into target_tbl shows up |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); |
||||
data |
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
||||
BEGIN |
||||
table public.target_tbl: INSERT: id[integer]:1 data[text]:'BEGIN' |
||||
table public.target_tbl: INSERT: id[integer]:2 data[text]:'table public.origin_tbl: INSERT: id[integer]:1 data[text]:''will be replicated and decoded and decoded again''' |
||||
table public.target_tbl: INSERT: id[integer]:3 data[text]:'COMMIT' |
||||
COMMIT |
||||
(5 rows) |
||||
|
||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated, but not decoded again'); |
||||
-- mark session as replaying |
||||
SELECT pg_replication_origin_session_setup('test_decoding: regression_slot'); |
||||
pg_replication_origin_session_setup |
||||
------------------------------------- |
||||
|
||||
(1 row) |
||||
|
||||
-- ensure we prevent duplicate setup |
||||
SELECT pg_replication_origin_session_setup('test_decoding: regression_slot'); |
||||
ERROR: cannot setup replication origin when one is already setup |
||||
BEGIN; |
||||
-- setup transaction origin |
||||
SELECT pg_replication_origin_xact_setup('0/aabbccdd', '2013-01-01 00:00'); |
||||
pg_replication_origin_xact_setup |
||||
---------------------------------- |
||||
|
||||
(1 row) |
||||
|
||||
INSERT INTO target_tbl(data) |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1'); |
||||
COMMIT; |
||||
-- check replication progress for the session is correct |
||||
SELECT pg_replication_origin_session_progress(false); |
||||
pg_replication_origin_session_progress |
||||
---------------------------------------- |
||||
0/AABBCCDD |
||||
(1 row) |
||||
|
||||
SELECT pg_replication_origin_session_progress(true); |
||||
pg_replication_origin_session_progress |
||||
---------------------------------------- |
||||
0/AABBCCDD |
||||
(1 row) |
||||
|
||||
SELECT pg_replication_origin_session_reset(); |
||||
pg_replication_origin_session_reset |
||||
------------------------------------- |
||||
|
||||
(1 row) |
||||
|
||||
SELECT local_id, external_id, remote_lsn, local_lsn <> '0/0' FROM pg_replication_origin_status; |
||||
local_id | external_id | remote_lsn | ?column? |
||||
----------+--------------------------------+------------+---------- |
||||
1 | test_decoding: regression_slot | 0/AABBCCDD | t |
||||
(1 row) |
||||
|
||||
-- check replication progress identified by name is correct |
||||
SELECT pg_replication_origin_progress('test_decoding: regression_slot', false); |
||||
pg_replication_origin_progress |
||||
-------------------------------- |
||||
0/AABBCCDD |
||||
(1 row) |
||||
|
||||
SELECT pg_replication_origin_progress('test_decoding: regression_slot', true); |
||||
pg_replication_origin_progress |
||||
-------------------------------- |
||||
0/AABBCCDD |
||||
(1 row) |
||||
|
||||
-- ensure reset requires previously setup state |
||||
SELECT pg_replication_origin_session_reset(); |
||||
ERROR: no replication origin is configured |
||||
-- and magically the replayed xact will be filtered! |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1'); |
||||
data |
||||
------ |
||||
(0 rows) |
||||
|
||||
--but new original changes still show up |
||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated'); |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1'); |
||||
data |
||||
-------------------------------------------------------------------------------- |
||||
BEGIN |
||||
table public.origin_tbl: INSERT: id[integer]:3 data[text]:'will be replicated' |
||||
COMMIT |
||||
(3 rows) |
||||
|
||||
SELECT pg_drop_replication_slot('regression_slot'); |
||||
pg_drop_replication_slot |
||||
-------------------------- |
||||
|
||||
(1 row) |
||||
|
||||
SELECT pg_replication_origin_drop('test_decoding: regression_slot'); |
||||
pg_replication_origin_drop |
||||
---------------------------- |
||||
|
||||
(1 row) |
||||
|
@ -0,0 +1,64 @@ |
||||
-- predictability |
||||
SET synchronous_commit = on; |
||||
|
||||
CREATE TABLE origin_tbl(id serial primary key, data text); |
||||
CREATE TABLE target_tbl(id serial primary key, data text); |
||||
|
||||
SELECT pg_replication_origin_create('test_decoding: regression_slot'); |
||||
-- ensure duplicate creations fail |
||||
SELECT pg_replication_origin_create('test_decoding: regression_slot'); |
||||
|
||||
--ensure deletions work (once) |
||||
SELECT pg_replication_origin_create('test_decoding: temp'); |
||||
SELECT pg_replication_origin_drop('test_decoding: temp'); |
||||
SELECT pg_replication_origin_drop('test_decoding: temp'); |
||||
|
||||
SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding'); |
||||
|
||||
-- origin tx |
||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated and decoded and decoded again'); |
||||
INSERT INTO target_tbl(data) |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); |
||||
|
||||
-- as is normal, the insert into target_tbl shows up |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); |
||||
|
||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated, but not decoded again'); |
||||
|
||||
-- mark session as replaying |
||||
SELECT pg_replication_origin_session_setup('test_decoding: regression_slot'); |
||||
|
||||
-- ensure we prevent duplicate setup |
||||
SELECT pg_replication_origin_session_setup('test_decoding: regression_slot'); |
||||
|
||||
BEGIN; |
||||
-- setup transaction origin |
||||
SELECT pg_replication_origin_xact_setup('0/aabbccdd', '2013-01-01 00:00'); |
||||
INSERT INTO target_tbl(data) |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1'); |
||||
COMMIT; |
||||
|
||||
-- check replication progress for the session is correct |
||||
SELECT pg_replication_origin_session_progress(false); |
||||
SELECT pg_replication_origin_session_progress(true); |
||||
|
||||
SELECT pg_replication_origin_session_reset(); |
||||
|
||||
SELECT local_id, external_id, remote_lsn, local_lsn <> '0/0' FROM pg_replication_origin_status; |
||||
|
||||
-- check replication progress identified by name is correct |
||||
SELECT pg_replication_origin_progress('test_decoding: regression_slot', false); |
||||
SELECT pg_replication_origin_progress('test_decoding: regression_slot', true); |
||||
|
||||
-- ensure reset requires previously setup state |
||||
SELECT pg_replication_origin_session_reset(); |
||||
|
||||
-- and magically the replayed xact will be filtered! |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1'); |
||||
|
||||
--but new original changes still show up |
||||
INSERT INTO origin_tbl(data) VALUES ('will be replicated'); |
||||
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'only-local', '1'); |
||||
|
||||
SELECT pg_drop_replication_slot('regression_slot'); |
||||
SELECT pg_replication_origin_drop('test_decoding: regression_slot'); |
@ -0,0 +1,93 @@ |
||||
<!-- doc/src/sgml/replication-origins.sgml --> |
||||
<chapter id="replication-origins"> |
||||
<title>Replication Progress Tracking</title> |
||||
<indexterm zone="replication-origins"> |
||||
<primary>Replication Progress Tracking</primary> |
||||
</indexterm> |
||||
<indexterm zone="replication-origins"> |
||||
<primary>Replication Origins</primary> |
||||
</indexterm> |
||||
|
||||
<para> |
||||
Replication origins are intended to make it easier to implement |
||||
logical replication solutions on top |
||||
of <xref linkend="logicaldecoding">. They provide a solution to two |
||||
common problems: |
||||
<itemizedlist> |
||||
<listitem><para>How to safely keep track of replication progress</para></listitem> |
||||
<listitem><para>How to change replication behavior, based on the |
||||
origin of a row; e.g. to avoid loops in bi-directional replication |
||||
setups</para></listitem> |
||||
</itemizedlist> |
||||
</para> |
||||
|
||||
<para> |
||||
Replication origins consist out of a name and a oid. The name, which |
||||
is what should be used to refer to the origin across systems, is |
||||
free-form text. It should be used in a way that makes conflicts |
||||
between replication origins created by different replication |
||||
solutions unlikely; e.g. by prefixing the replication solution's |
||||
name to it. The oid is used only to avoid having to store the long |
||||
version in situations where space efficiency is important. It should |
||||
never be shared between systems. |
||||
</para> |
||||
|
||||
<para> |
||||
Replication origins can be created using the |
||||
<link linkend="pg-replication-origin-create"><function>pg_replication_origin_create()</function></link>; |
||||
dropped using |
||||
<link linkend="pg-replication-origin-drop"><function>pg_replication_origin_drop()</function></link>; |
||||
and seen in the |
||||
<link linkend="catalog-pg-replication-origin"><structname>pg_replication_origin</structname></link> |
||||
catalog. |
||||
</para> |
||||
|
||||
<para> |
||||
When replicating from one system to another (independent of the fact that |
||||
those two might be in the same cluster, or even same database) one |
||||
nontrivial part of building a replication solution is to keep track of |
||||
replay progress in a safe manner. When the applying process, or the whole |
||||
cluster, dies, it needs to be possible to find out up to where data has |
||||
successfully been replicated. Naive solutions to this like updating a row in |
||||
a table for every replayed transaction have problems like runtime overhead |
||||
bloat. |
||||
</para> |
||||
|
||||
<para> |
||||
Using the replication origin infrastructure a session can be |
||||
marked as replaying from a remote node (using the |
||||
<link linkend="pg-replication-origin-session-setup"><function>pg_replication_origin_session_setup()</function></link> |
||||
function. Additionally the <acronym>LSN</acronym> and commit |
||||
timestamp of every source transaction can be configured on a per |
||||
transaction basis using |
||||
<link linkend="pg-replication-origin-xact-setup"><function>pg_replication_origin_xact-setup()</function></link>. |
||||
If that's done replication progress will be persist in a crash safe |
||||
manner. Replay progress for all replication origins can be seen in the |
||||
<link linkend="catalog-pg-replication-origin-status"> |
||||
<structname>pg_replication_origin_status</structname> |
||||
</link> view. A individual origin's progress, e.g. when resuming |
||||
replication, can be acquired using |
||||
<link linkend="pg-replication-origin-progress"><function>pg_replication_origin_progress()</function></link> |
||||
for any origin or |
||||
<link linkend="pg-replication-origin-session-progress"><function>pg_replication_origin_session_progress()</function></link> |
||||
for the origin configured in the current session. |
||||
</para> |
||||
|
||||
<para> |
||||
In more complex replication topologies than replication from exactly one |
||||
system to one other, another problem can be that, that it is hard to avoid |
||||
replicating replayed rows again. That can lead both to cycles in the |
||||
replication and inefficiencies. Replication origins provide a optional |
||||
mechanism to recognize and prevent that. When configured using the functions |
||||
referenced in the previous paragraph, every change and transaction passed to |
||||
output plugin callbacks (see <xref linkend="logicaldecoding-output-plugin">) |
||||
generated by the session is tagged with the replication origin of the |
||||
generating session. This allows to treat them differently in the output |
||||
plugin, e.g. ignoring all but locally originating rows. Additionally |
||||
the <link linkend="logicaldecoding-output-plugin-filter-by-origin"> |
||||
<function>filter_by_origin_cb</function></link> callback can be used |
||||
to filter the logical decoding change stream based on the |
||||
source. While less flexible, filtering via that callback is |
||||
considerably more efficient. |
||||
</para> |
||||
</chapter> |
@ -0,0 +1,61 @@ |
||||
/*-------------------------------------------------------------------------
|
||||
* |
||||
* replorigindesc.c |
||||
* rmgr descriptor routines for replication/logical/replication_origin.c |
||||
* |
||||
* Portions Copyright (c) 2015, PostgreSQL Global Development Group |
||||
* |
||||
* |
||||
* IDENTIFICATION |
||||
* src/backend/access/rmgrdesc/replorigindesc.c |
||||
* |
||||
*------------------------------------------------------------------------- |
||||
*/ |
||||
#include "postgres.h" |
||||
|
||||
#include "replication/origin.h" |
||||
|
||||
void |
||||
replorigin_desc(StringInfo buf, XLogReaderState *record) |
||||
{ |
||||
char *rec = XLogRecGetData(record); |
||||
uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK; |
||||
|
||||
switch (info) |
||||
{ |
||||
case XLOG_REPLORIGIN_SET: |
||||
{ |
||||
xl_replorigin_set *xlrec; |
||||
xlrec = (xl_replorigin_set *) rec; |
||||
|
||||
appendStringInfo(buf, "set %u; lsn %X/%X; force: %d", |
||||
xlrec->node_id, |
||||
(uint32) (xlrec->remote_lsn >> 32), |
||||
(uint32) xlrec->remote_lsn, |
||||
xlrec->force); |
||||
break; |
||||
} |
||||
case XLOG_REPLORIGIN_DROP: |
||||
{ |
||||
xl_replorigin_drop *xlrec; |
||||
xlrec = (xl_replorigin_drop *) rec; |
||||
|
||||
appendStringInfo(buf, "drop %u", xlrec->node_id); |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
|
||||
const char * |
||||
replorigin_identify(uint8 info) |
||||
{ |
||||
switch (info) |
||||
{ |
||||
case XLOG_REPLORIGIN_SET: |
||||
return "SET"; |
||||
case XLOG_REPLORIGIN_DROP: |
||||
return "DROP"; |
||||
default: |
||||
return NULL; |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,70 @@ |
||||
/*-------------------------------------------------------------------------
|
||||
* |
||||
* pg_replication_origin.h |
||||
* Persistent replication origin registry |
||||
* |
||||
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group |
||||
* Portions Copyright (c) 1994, Regents of the University of California |
||||
* |
||||
* src/include/catalog/pg_replication_origin.h |
||||
* |
||||
* NOTES |
||||
* the genbki.pl script reads this file and generates .bki |
||||
* information from the DATA() statements. |
||||
* |
||||
*------------------------------------------------------------------------- |
||||
*/ |
||||
#ifndef PG_REPLICATION_ORIGIN_H |
||||
#define PG_REPLICATION_ORIGIN_H |
||||
|
||||
#include "catalog/genbki.h" |
||||
#include "access/xlogdefs.h" |
||||
|
||||
/* ----------------
|
||||
* pg_replication_origin. cpp turns this into |
||||
* typedef struct FormData_pg_replication_origin |
||||
* ---------------- |
||||
*/ |
||||
#define ReplicationOriginRelationId 6000 |
||||
|
||||
CATALOG(pg_replication_origin,6000) BKI_SHARED_RELATION BKI_WITHOUT_OIDS |
||||
{ |
||||
/*
|
||||
* Locally known id that get included into WAL. |
||||
* |
||||
* This should never leave the system. |
||||
* |
||||
* Needs to fit into a uint16, so we don't waste too much space in WAL |
||||
* records. For this reason we don't use a normal Oid column here, since |
||||
* we need to handle allocation of new values manually. |
||||
*/ |
||||
Oid roident; |
||||
|
||||
/*
|
||||
* Variable-length fields start here, but we allow direct access to |
||||
* roname. |
||||
*/ |
||||
|
||||
/* external, free-format, name */ |
||||
text roname BKI_FORCE_NOT_NULL; |
||||
|
||||
#ifdef CATALOG_VARLEN /* further variable-length fields */ |
||||
#endif |
||||
} FormData_pg_replication_origin; |
||||
|
||||
typedef FormData_pg_replication_origin *Form_pg_replication_origin; |
||||
|
||||
/* ----------------
|
||||
* compiler constants for pg_replication_origin |
||||
* ---------------- |
||||
*/ |
||||
#define Natts_pg_replication_origin 2 |
||||
#define Anum_pg_replication_origin_roident 1 |
||||
#define Anum_pg_replication_origin_roname 2 |
||||
|
||||
/* ----------------
|
||||
* pg_replication_origin has no initial contents |
||||
* ---------------- |
||||
*/ |
||||
|
||||
#endif /* PG_REPLICATION_ORIGIN_H */ |
@ -0,0 +1,86 @@ |
||||
/*-------------------------------------------------------------------------
|
||||
* origin.h |
||||
* Exports from replication/logical/origin.c |
||||
* |
||||
* Copyright (c) 2013-2015, PostgreSQL Global Development Group |
||||
* |
||||
* src/include/replication/origin.h |
||||
*------------------------------------------------------------------------- |
||||
*/ |
||||
#ifndef PG_ORIGIN_H |
||||
#define PG_ORIGIN_H |
||||
|
||||
#include "access/xlogdefs.h" |
||||
#include "catalog/pg_replication_origin.h" |
||||
#include "replication/logical.h" |
||||
|
||||
typedef struct xl_replorigin_set |
||||
{ |
||||
XLogRecPtr remote_lsn; |
||||
RepOriginId node_id; |
||||
bool force; |
||||
} xl_replorigin_set; |
||||
|
||||
typedef struct xl_replorigin_drop |
||||
{ |
||||
RepOriginId node_id; |
||||
} xl_replorigin_drop; |
||||
|
||||
#define XLOG_REPLORIGIN_SET 0x00 |
||||
#define XLOG_REPLORIGIN_DROP 0x10 |
||||
|
||||
#define InvalidRepOriginId 0 |
||||
#define DoNotReplicateId UINT16_MAX |
||||
|
||||
extern PGDLLIMPORT RepOriginId replorigin_sesssion_origin; |
||||
extern PGDLLIMPORT XLogRecPtr replorigin_sesssion_origin_lsn; |
||||
extern PGDLLIMPORT TimestampTz replorigin_sesssion_origin_timestamp; |
||||
|
||||
/* API for querying & manipulating replication origins */ |
||||
extern RepOriginId replorigin_by_name(char *name, bool missing_ok); |
||||
extern RepOriginId replorigin_create(char *name); |
||||
extern void replorigin_drop(RepOriginId roident); |
||||
extern bool replorigin_by_oid(RepOriginId roident, bool missing_ok, |
||||
char **roname); |
||||
|
||||
/* API for querying & manipulating replication progress tracking */ |
||||
extern void replorigin_advance(RepOriginId node, |
||||
XLogRecPtr remote_commit, |
||||
XLogRecPtr local_commit, |
||||
bool go_backward, bool wal_log); |
||||
extern XLogRecPtr replorigin_get_progress(RepOriginId node, bool flush); |
||||
|
||||
extern void replorigin_session_advance(XLogRecPtr remote_commit, |
||||
XLogRecPtr local_commit); |
||||
extern void replorigin_session_setup(RepOriginId node); |
||||
extern void replorigin_session_reset(void); |
||||
extern XLogRecPtr replorigin_session_get_progress(bool flush); |
||||
|
||||
/* Checkpoint/Startup integration */ |
||||
extern void CheckPointReplicationOrigin(void); |
||||
extern void StartupReplicationOrigin(void); |
||||
|
||||
/* WAL logging */ |
||||
void replorigin_redo(XLogReaderState *record); |
||||
void replorigin_desc(StringInfo buf, XLogReaderState *record); |
||||
const char * replorigin_identify(uint8 info); |
||||
|
||||
/* shared memory allocation */ |
||||
extern Size ReplicationOriginShmemSize(void); |
||||
extern void ReplicationOriginShmemInit(void); |
||||
|
||||
/* SQL callable functions */ |
||||
extern Datum pg_replication_origin_create(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_drop(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_oid(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_session_setup(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_session_reset(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_session_is_setup(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_session_progress(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_xact_setup(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_xact_reset(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_advance(PG_FUNCTION_ARGS); |
||||
extern Datum pg_replication_origin_progress(PG_FUNCTION_ARGS); |
||||
extern Datum pg_show_replication_origin_status(PG_FUNCTION_ARGS); |
||||
|
||||
#endif /* PG_ORIGIN_H */ |
Loading…
Reference in new issue