Re: loss of transactions in streaming replication
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-10-19T12:44:37Z
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 →
-
Send status updates back from standby server to master, indicating how far
- b186523fd97c 9.1.0 cited
-
Allow bidirectional copy messages in streaming replication mode.
- d3d414696f39 9.1.0 cited
On Wed, Oct 19, 2011 at 2:31 AM, Fujii Masao <masao.fujii@gmail.com> wrote: >> My reading of the situation is that you're talking about a problem >> that will only occur if, while the master is in the process of >> shutting down, a network error occurs. > > No. This happens even if a network error doesn't occur. I can > reproduce the issue by doing the following: > > 1. Set up streaming replication master and standby with archive > setting. > 2. Run pgbench -i > 3. Shuts down the master with fast mode. > > Then I can see that the latest WAL file in the master's pg_xlog > doesn't exist in the standby's one. The WAL record which was > lost was the shutdown checkpoint one. > > When smart or fast shutdown is requested, the master tries to > write and send the WAL switch (if archiving is enabled) and > shutdown checkpoint record. Because of the problem I described, > the WAL switch record arrives at the standby but the shutdown > checkpoint does not. Oh, that's not good. > The original behavior, in 9.0, is that all outstanding WAL are > replicated to the standby when the master shuts down normally. > But ISTM the behavior was changed unexpectedly in 9.1. So > I think that it should be back-patched to 9.1 to revert the behavior > to the original. Which commit broke this? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company