Skip site navigation (1) Skip section navigation (2)

Walsender process patch v1 for Synch Rep

From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Subject: Walsender process patch v1 for Synch Rep
Date: 2008-11-05 14:17:14
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers

> To be reviewed easily, I'm splitting Synch Rep patch into some pieces.

Attached is a patch only to start and manage walsender process. This patch
don't include replication itself, walreceiver and signal handling patch, etc.

The outline of this patch is as follow:

As pointed out at another thread, for authentication, I defined the database
only for replication (named "walsender" tentatively). walsender database is
not pseudo but created by initdb like postgres database, because the user
can re-create it easily even if it is lost accidentally.

If the startup packet specifies walsender database, a backend declares
postmaster working as walsender. Then, the backend is removed from
BackendList and managed as background process by postmaster.

Replication message
I defined new message type 'R', which means the start of replication. If the
message is received, walsender will perform the main routine. Of course,
a backend who is not walsender cannot perform the routine.

I arranged the shutdown timing of walsender. For example, in smart
shutdown case, walsender should exit after bgwriter at least in order to
replicate a shutdown checkpoint xlog.

In the main routine, walsender sets up signal handlers, etc again.

And some bug fixes.


Fujii Masao
NTT Open Source Software Center

Attachment: walsender_process_v1.tgz
Description: application/x-gzip (9.3 KB)


pgsql-hackers by date

Next:From: Pavel StehuleDate: 2008-11-05 14:24:36
Subject: Re: array_length()
Previous:From: Peter EisentrautDate: 2008-11-05 14:12:52
Subject: Re: array_length()

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group