Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VDUOf-0006Zl-D3 for pgsql-bugs@arkaria.postgresql.org; Sun, 25 Aug 2013 07:06:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VDUOe-00081y-JZ for pgsql-bugs@arkaria.postgresql.org; Sun, 25 Aug 2013 07:06:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VDUOc-00081p-KI for pgsql-bugs@postgresql.org; Sun, 25 Aug 2013 07:05:58 +0000 Received: from sraihb2.sra.co.jp ([202.32.10.6]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VDUOU-0000C8-0I for pgsql-bugs@postgresql.org; Sun, 25 Aug 2013 07:05:58 +0000 Received: from srascc.sra.co.jp (srascc [133.137.8.66]) by sraihb2.sra.co.jp (Postfix) with SMTP id 78C922A15FA for ; Sun, 25 Aug 2013 16:05:47 +0900 (JST) Received: from (srascb.sra.co.jp [133.137.8.65]) by srascc.sra.co.jp with smtp id 79a5_5263_c45dfb14_0d54_11e3_956d_001d096c60d0; Sun, 25 Aug 2013 16:05:46 +0900 Received: from sranhm.sra.co.jp (osspc25 [133.137.176.97]) by srascb.sra.co.jp (Postfix) with ESMTP id 61F1D110C70 for ; Sun, 25 Aug 2013 16:05:47 +0900 (JST) Received: from harukat-pc (dhcp-177-114.sra.co.jp [133.137.177.114]) by sranhm.sra.co.jp (Postfix) with SMTP id 4A817A0A14 for ; Sun, 25 Aug 2013 16:05:47 +0900 (JST) Date: Sun, 25 Aug 2013 16:05:49 +0900 From: TAKATSUKA Haruka To: pgsql-bugs Subject: Re: BUG #8397: pg_basebackup -x from new standby server sometimes causes Segmentation fault Message-Id: <20130825160549.8cbe1bfd.harukat@sraoss.co.jp> In-Reply-To: References: Organization: SRA OSS,Inc. X-Mailer: Sylpheed Pro 2.1.2 (GTK+ 2.10.14; i686-pc-mingw32; Pro 2.1.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 Thanks for the response. On Sat, 24 Aug 2013 17:04:21 +0200 Magnus Hagander wrote: > > (1) create new standby server dir by pg_basebackup without -x > > (2) start new standby server > > (3) pg_basebackup from new standby server with -x > > (!) when new standby has no WAL files in pg_xlog, > > new standby's wal sender crash (snip) > > Though pg_basebackup does not have to work in this rare case, > > we should insert something like "if (nWalFiles <= 0) ereport(...);". > > Yes, we definitely need better error checking there - a crash is never > the right answer. > > Does this happen only when you take a backup "really quickly" after > setting up the new standby, It's just this first case. Therefore, we recognize that it is the problem of how to use. regards, > or is there some scenario further in it's > lifetime when it can happen? In the first case, throwing a hard error > seems quite reasonable, but if it's repeatable, perhaps there is > something better we can do? > > Also, while we definitely need a sanity check at this point, might it > be worth it to put a second check earlier in the process as well - > since AFAICT this error gets thrown only after all the data has been > sent arlready. > > -- > Magnus Hagander > Me: http://www.hagander.net/ > Work: http://www.redpill-linpro.com/ ______________________________________________________ harukat@sraoss.co.jp (SRA OSS, Inc. http://www.sraoss.co.jp) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs