BUG #8364: BUG: Patch for fail-back without fresh backup

Поиск
Список
Период
Сортировка
От digoal@126.com
Тема BUG #8364: BUG: Patch for fail-back without fresh backup
Дата
Msg-id E1V6X3l-0007kx-1U@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-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=e5592c61adb0766eaee53ec07d2f05783d1c6548;sf=tgz
.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: BUG #8362: postres webserver
Следующее
От: bughunt@gluino.name
Дата:
Сообщение: BUG #8365: Two documentation suggestions