Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6Y5P-0000SG-6N for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Aug 2013 03:37:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V6Y5O-0001W0-F0 for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Aug 2013 03:37:26 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6X3z-00051j-S9 for pgsql-bugs@postgresql.org; Tue, 06 Aug 2013 02:31:56 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6X3r-0008Ja-Hy for pgsql-bugs@postgresql.org; Tue, 06 Aug 2013 02:31:55 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V6X3q-00059o-Bg for pgsql-bugs@postgresql.org; Tue, 06 Aug 2013 02:31:47 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1V6X3l-0007kx-1U for pgsql-bugs@postgresql.org; Tue, 06 Aug 2013 02:31:41 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8364: BUG: Patch for fail-back without fresh backup To: pgsql-bugs@postgresql.org From: digoal@126.com Message-Id: Date: Tue, 06 Aug 2013 02:31:41 +0000 X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs