mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Introduce Streaming Replication.
This includes two new kinds of postmaster processes, walsenders and walreceiver. Walreceiver is responsible for connecting to the primary server and streaming WAL to disk, while walsender runs in the primary server and streams WAL from disk to the client. Documentation still needs work, but the basics are there. We will probably pull the replication section to a new chapter later on, as well as the sections describing file-based replication. But let's do that as a separate patch, so that it's easier to see what has been added/changed. This patch also adds a new section to the chapter about FE/BE protocol, documenting the protocol used by walsender/walreceivxer. Bump catalog version because of two new functions, pg_last_xlog_receive_location() and pg_last_xlog_replay_location(), for monitoring the progress of replication. Fujii Masao, with additional hacking by me
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.382 2010/01/02 16:58:11 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.383 2010/01/15 09:19:10 heikki Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -227,6 +227,9 @@ static const PQconninfoOption PQconninfoOptions[] = {
|
||||
"GSS-library", "", 7}, /* sizeof("gssapi") = 7 */
|
||||
#endif
|
||||
|
||||
{"replication", NULL, NULL, NULL,
|
||||
"Replication", "D", 5},
|
||||
|
||||
/* Terminating entry --- MUST BE LAST */
|
||||
{NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, 0}
|
||||
@ -472,6 +475,8 @@ connectOptions1(PGconn *conn, const char *conninfo)
|
||||
tmp = conninfo_getval(connOptions, "gsslib");
|
||||
conn->gsslib = tmp ? strdup(tmp) : NULL;
|
||||
#endif
|
||||
tmp = conninfo_getval(connOptions, "replication");
|
||||
conn->replication = tmp ? strdup(tmp) : NULL;
|
||||
|
||||
/*
|
||||
* Free the option info - all is in conn now
|
||||
@ -2136,6 +2141,8 @@ freePGconn(PGconn *conn)
|
||||
free(conn->fbappname);
|
||||
if (conn->dbName)
|
||||
free(conn->dbName);
|
||||
if (conn->replication)
|
||||
free(conn->replication);
|
||||
if (conn->pguser)
|
||||
free(conn->pguser);
|
||||
if (conn->pgpass)
|
||||
|
Reference in New Issue
Block a user