Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGbib-00059H-MZ for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Jul 2015 23:40:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZGbia-0004s4-2y for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Jul 2015 23:40:32 +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 1ZGbiX-0004qP-0i for pgsql-hackers@postgresql.org; Sat, 18 Jul 2015 23:40:29 +0000 Received: from mout.gmx.net ([212.227.15.18]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.84) (envelope-from ) id 1ZGbiU-0005GS-26 for pgsql-hackers@postgresql.org; Sat, 18 Jul 2015 23:40:27 +0000 Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M5cpk-1Z11kF1owC-00xbwo for ; Sun, 19 Jul 2015 01:40:23 +0200 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id BF4A820445 for ; Sat, 18 Jul 2015 19:40:21 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Sat, 18 Jul 2015 19:40:21 -0400 X-Sasl-enc: IaUH5fYAHX4u7ucAhxDzdTQ4mwmz/0ALIPffQHyhj8R4 1437262821 Received: from [10.0.0.9] (c-73-13-69-21.hsd1.pa.comcast.net [73.13.69.21]) by mail.messagingengine.com (Postfix) with ESMTPA id 8477A6801AF; Sat, 18 Jul 2015 19:40:21 -0400 (EDT) Message-ID: <55AAE3E4.1090309@gmx.net> Date: Sat, 18 Jul 2015 19:40:20 -0400 From: Peter Eisentraut User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Petr Jelinek , PostgreSQL-development Subject: Re: pg_resetsysid References: <557D9DED.2080204@2ndquadrant.com> <55A99E07.3050905@gmx.net> <55AA57CE.4020400@2ndquadrant.com> In-Reply-To: <55AA57CE.4020400@2ndquadrant.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:BL2bUXd1t2fCGqzWH6bhh0rEC/WDwf6XlHT7YvyDZeRzd6nnr8P Nd/2l1Ptj+IG0bObbrPY5eAxjlACRPo/N3kIh6qOJMmksfmacdoERCuPsPIU3ep4urkhEy2 Ei14EN8P+XuFv1z54pnIGVwsmrPmCzC4Vo9vQz7/neRX4HhAazeahipw/OPHkeOaAGJMXea bvfL8bdLUJQH3FmARG7ZA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Dw0duyVuJS0=:j513RJlG/3diBWQl6v+4e7 Hkaw2j2oXFDjReyhfhn0DGoryIijtJKJ6xjMcK59bXenALSF93HhPpsf6cqAVseBlQEGOmjMO Sll/Sgs9SJ0kEqE6R9MJgZpUGphQ7a8rRV+DlyHKyjvl9blJh/h1P8ZGziO1TBlDu/74m9NQw xPjHoYLCiJMgVKiv2wKrZeAYj59BpHo0UEkKwqJfnIAwSr0Wl3MQouDWSWrxrFG1iNaj3QtOH 5e7LiKBOHVJlB0OAIKRXi3Aq4RoLs90r/glCBWy4nadS24eUvs7L2DQMWLDrEZ950WMcp7BTo d8BfAaGR/jiRUbeGap5uf0ZZFCAmiRrUbFoe13ecQAOXgCxKw6Qe4eaBrzKDIG+bMsr1Lny5E dvsdVagPA5sl4FVTy1PwdhJVifMAwfGc9im9PWn2SkzXVG7NLs84ndPb77AeqCNlXl24f0BHZ ZUi/S4dA5HgDVAesOxhAqqTDyDn3qTMlzVRnVMLMfnzhE1XUwZvewDEDvaWH1a+njcYIVN4Zk /6mV1pfmkCx3zOklMvB67WfHTvQaJRiDqNJZG7TWI3Q39mm5/ieZywUSADS60dRgYzd6DdZ5j fHpTvnpooZcjKmGZrEmJ9tYCdIpF50fXh6V6dxCdkqq+X1gY4i0V6CYBgHMDIdtmIMkK6A4eT gio5KVdNesizsF73daZnH5lU543xTdSZyq4imuZofqu0qNuU3XfRi/Ewm+gQjW7MzoVA= X-Pg-Spam-Score: -3.1 (---) 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 7/18/15 9:42 AM, Petr Jelinek wrote: > 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. In my reading of the thread, I did not get the sense that that was the consensus. There were certainly a lot of different opinions, but specifically some people ended up withdrawing their objections to using 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). I don't buy the more or less dangerous argument. Many tools can be dangerous. cp can be dangerous if you overwrite the wrong file. pg_restore can be dangerous if you give it the wrong options. Changing the system ID is also dangerous, as it can break replication and truncate the WAL. Right now, changing the system ID is an obscure step in some obscure workflow related to some obscure feature. That is not to say it's invalid, but it's not something that we can present to a normal user as the official workflow. Just adding little tools of the nature "whack this around until it's in the right shape for this other thing" is just adding complications on top of complications. If we want to turn this into a less "dangerous" and more user-facing feature, I would like to see a complete workflow of how this would be used. Maybe we'll come up with a better solution. For example, why couldn't pg_basebackup take care of this? > Something like pg_setcontroldata but that's too long. Well, there is nothing so far saying that pg_controldata couldn't also write to pg_control. It's not called pg_getcontroldata. ;-) -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers