From: digoal@126.com
To: pgsql-bugs@postgresql.org
Subject: BUG #8364: BUG: Patch for fail-back without fresh backup
Date: Tue, 06 Aug 2013 02:31:41 +0000
Message-ID: <E1V6X3l-0007kx-1U@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 8364
Logged by: digoal.zhou
Email address: digoal@126.com
PostgreSQL version: Unsupported/Unknown
Operating system: CentOS 5.8 x64
Description:
When i use failback_safe_standby_v4.patch patch the postgresql 9.4 devel
http://git.postgresql.org/gitweb/?p=postgresql.git;a=snapshot;h=e5592c61adb0766eaee53ec07d2f05783d1c...
.patch success. but test in async replicatoin environment fail-back not
success.
detail below:
1. primary config
wal_level = hot_standby
synchronous_commit = remote_write
synchronous_transfer=data_flush # or all, but fail-back also not success.
2. standby config
3. test sql
digoal=# create table test (id int primary key, info text, crt_time
timestamp);
CREATE TABLE
digoal=# create or replace function func() returns void as $$
digoal$# declare
digoal$# v_id int;
digoal$# begin
digoal$# v_id := round(5000000*random());
digoal$# update test set
info=md5(random()::text),crt_time=clock_timestamp() where id=v_id;
digoal$# if found then
digoal$# return;
digoal$# else
digoal$# insert into test values
(v_id,md5(random()::text),clock_timestamp());
digoal$# end if;
digoal$# return;
digoal$# end;
digoal$# $$ language plpgsql strict;
CREATE FUNCTION
4. pgbench running
pgbench -M prepared -f ./test.sql -r -n -h $PGDATA -p 2999 -U postgres -c 16
-j 4 -T 100 digoal
5. checkpoint on master success
6. shutdown or promote standby
success
7. pgbench stop
8. shutdown master, and fail-back to standby, but not success.
log below.
2013-08-06 09:39:53.650 CST,,,13339,,520053e9.341b,2,,2013-08-06 09:39:53
CST,,0,FATAL,XX000,"could not receive data from WAL stream: ERROR:
requested starting point 0/52000000 is ahead of the WAL flush position of
this server 0/45AD6088
",,,,,,,,"libpqrcv_receive, libpqwalreceiver.c:513",""
# ### but i can success fail-back when use sync replication and this patch.
detail info at my blog:
http://blog.163.com/digoal@126/blog/static/16387704020137551911457
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: digoal@126.com
Subject: Re: BUG #8364: BUG: Patch for fail-back without fresh backup
In-Reply-To: <E1V6X3l-0007kx-1U@wrigleys.postgresql.org>
References: <E1V6X3l-0007kx-1U@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox