Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 51752A8D2AA for ; Tue, 26 Jun 2012 00:17:55 -0300 (ADT) Received: from szxga01-in.huawei.com ([119.145.14.64]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SjMHp-00089O-6P for pgsql-hackers@postgresql.org; Tue, 26 Jun 2012 03:17:54 +0000 Received: from 172.24.2.119 (EHLO szxeml201-edg.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.1.9-GA FastPath queued) with ESMTP id AKQ55056; Tue, 26 Jun 2012 11:14:55 +0800 (CST) Received: from SZXEML421-HUB.china.huawei.com (10.82.67.160) by szxeml201-edg.china.huawei.com (172.24.2.39) with Microsoft SMTP Server (TLS) id 14.1.323.3; Tue, 26 Jun 2012 11:14:50 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml421-hub.china.huawei.com (10.82.67.160) with Microsoft SMTP Server id 14.1.323.3; Tue, 26 Jun 2012 11:14:51 +0800 From: Amit Kapila To: "'Tom Lane'" , "'Heikki Linnakangas'" CC: "'Robert Haas'" , "'Fujii Masao'" , "'Andres Freund'" , References: <4FDA5136.6080206@enterprisedb.com> <201206142358.12431.andres@2ndquadrant.com> <4FDF6E8E.4080900@enterprisedb.com> <4FE034D0.5070900@enterprisedb.com> <4FE73F3F.5040105@enterprisedb.com> <4FE8FDBE.8060901@enterprisedb.com> <8405.1340675505@sss.pgh.pa.us> In-Reply-To: <8405.1340675505@sss.pgh.pa.us> Subject: Re: WAL format changes Date: Tue, 26 Jun 2012 08:44:50 +0530 Message-ID: <001501cd5349$d9e82480$8db86d80$@kapila@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac1TPmWGSNNLP7IsSMGphXqu24xCzQACh7bg Content-Language: en-us X-Originating-IP: [10.18.96.98] X-CFilter-Loop: Reflected X-Pg-Spam-Score: -3.2 (---) X-Archive-Number: 201206/1502 X-Sequence-Number: 210342 From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Tom Lane Heikki Linnakangas writes: >> So I think we should change pg_resetxlog -l option to take a WAL file >> name as argument, and fix pg_upgrade accordingly. > Seems reasonable I guess. It's really specifying a starting WAL > location, but only to file granularity, so treating the argument as a > file name is sort of a type cheat but seems convenient. > If we do it that way, we'd better validate that the argument is a legal > WAL file name, so as to catch any cases where somebody tries to do it > old-style. > BTW, does pg_resetxlog's logic for setting the default -l value (from > scanning pg_xlog to find the largest existing file name) still work? It finds the segment number for largest existing file name from pg_xlog and then compare it with input provided by the user for -l Option, if input is greater it will use the input to set in control file. With Regards, Amit Kapila.