Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGSPX-0005UE-8c for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Jul 2015 13:44:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZGSPW-0003v8-Mj for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Jul 2015 13:44:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZGSOG-0002TO-H5 for pgsql-hackers@postgresql.org; Sat, 18 Jul 2015 13:42:56 +0000 Received: from mail-wg0-f48.google.com ([74.125.82.48]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZGSOD-0002XD-Ra for pgsql-hackers@postgresql.org; Sat, 18 Jul 2015 13:42:55 +0000 Received: by wgav7 with SMTP id v7so34744664wga.2 for ; Sat, 18 Jul 2015 06:42:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=FIXc0pX1Di+LQXskEvSJZMeSjsYGjkjROqmdPmaFJTY=; b=S/iRwDZcSX57wJTjPCynWLVJS6uVmVqkpesmZR9A+qqPKRhur3U7v3RKgp3pGxLNtG xZQUxhUHRAQUJqo6va8KJlBh9pKRRnkNNYp8OrNKZgtricTdw/ZGYF/GHeXjJvkpjawx 5aH5Acaqsfb1yrTaPoWrWNeDrbOyZ7GH9oTZbT/jSLyXHrOBhxq0VihqXvofI0/ZLhz6 uSZZzX0TO7cera86D8BD7WXvXSUUGrzJloLnnXKfxUs8wewB9aWIdqKJhgkScAnVKFoc +dwPhs8NonbyiHhclXYK8Zh2wJK4CtooOT4U1AzT+1yJhtuNsUbeimy0vixvlnfHDvuB yUyg== X-Gm-Message-State: ALoCoQmBY+G/09kU83HOqr2SMbMHDktOzUIb3BhT0RkR+5ix5vAgaAWBA2RMUtAsFoa6FIFYBOIRkcS/5thsQSbMS6QPHbcDeIXqoWg24qJeH7vWnF3amBeBUlSypAejeFIFUl2hbqaSChrfTLCs3inYrZpJZXkqzlQF8cS16VfYtXbAn3Yit8TdNdXbTev1AqNf4EvASuzS X-Received: by 10.180.83.101 with SMTP id p5mr5024220wiy.52.1437226972448; Sat, 18 Jul 2015 06:42:52 -0700 (PDT) Received: from ?IPv6:2a00:1028:9941:52fa:3dbe:31c4:e2a0:db84? (dynamic-2a00-1028-9941-52fa-3dbe-31c4-e2a0-db84.ipv6.broadband.iol.cz. [2a00:1028:9941:52fa:3dbe:31c4:e2a0:db84]) by smtp.gmail.com with ESMTPSA id x6sm2609150wiy.6.2015.07.18.06.42.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Jul 2015 06:42:51 -0700 (PDT) Message-ID: <55AA57CE.4020400@2ndquadrant.com> Date: Sat, 18 Jul 2015 15:42:38 +0200 From: Petr Jelinek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Peter Eisentraut , PostgreSQL-development Subject: Re: pg_resetsysid References: <557D9DED.2080204@2ndquadrant.com> <55A99E07.3050905@gmx.net> In-Reply-To: <55A99E07.3050905@gmx.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2015-07-18 02:29, Peter Eisentraut wrote: > On 6/14/15 11:29 AM, Petr Jelinek wrote: >> 0002 - Adds pg_resetsysid utility which changes the system id to newly >> generated one. >> >> 0003 - Adds -s option to pg_resetxlog to change the system id to the one >> specified - this is separate from the other one as it can be potentially >> more dangerous. > > Adding a new top-level binary creates a lot of maintenance overhead > (e.g., documentation, man page, translations, packaging), and it seems > silly to create a new tool whose only purpose is to change one number in > one file. If we're going to have this in pg_resetxlog anyway, why not > create another option letter to assigns a generated ID? As the > documentation says, resetting the system ID clears the WAL, so it's not > like this is a completely danger-free situation. > Well, last time I submitted this I did it exactly as you propose but there was long discussion about this changing the target audience of pg_resetxlog and that it would be better as separate binary from pg_resetxlog. It might more future proof to have more generic binary which can do all the less dangerous work that pg_resetxlog does (which currently is probably only -c and the newly proposed -s). Something like pg_setcontroldata but that's too long. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers