Re: pg_ctl failover Re: Latches, signals, and waiting
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Itagaki Takahiro <itagaki.takahiro@gmail.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2011-01-13T05:10:26Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove rare corner case for data loss when triggering standby server.
- faa055057258 9.1.0 cited
On Thu, Jan 13, 2011 at 11:29 AM, Itagaki Takahiro <itagaki.takahiro@gmail.com> wrote: > On Thu, Jan 13, 2011 at 00:14, Fujii Masao <masao.fujii@gmail.com> wrote: >>> pg_ctl failover ? At the moment, the location of the trigger file is >>> configurable, but if we accept a constant location like "$PGDATA/failover" >>> pg_ctl could do the whole thing, create the file and send signal. pg_ctl on >>> Window already knows how to send the "signal" via the named pipe signal >>> emulation. >> >> The attached patch implements the above-mentioned pg_ctl failover. > > I have three comments: Thanks for the review! > - Will we call it "failover"? We will use the command also in "switchover" > operations. "pg_ctl promote" might be more neutral, but users might be > hard to imagine replication feature from "promote". OK. Similarly, I should also change the word "failover" used in function and variable names to the "promote"? For example, #define PROMOTE_SIGNAL_FILE "promote" rather than #define FAILOVER_SIGNAL_FILE "failover"? > - pg_ctl should unlink failover_files when it failed to send failover signals. Good catch. > - "standby_triggered" variable might be renamed to "failover_triggered" or so. Furthermore, "failover_triggered" should be renamed to "promote_triggered"? Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center