Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZwztO-0003sC-LA for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Nov 2015 21:58:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZwztN-00062w-Ui for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Nov 2015 21:58:53 +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 1ZwztM-00062F-RJ for pgsql-bugs@postgresql.org; Thu, 12 Nov 2015 21:58:53 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZwztJ-0003x3-B8 for pgsql-bugs@postgresql.org; Thu, 12 Nov 2015 21:58:51 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [200.104.53.52]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id A2CF940174F; Thu, 12 Nov 2015 13:58:43 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id ACBF3800; Thu, 12 Nov 2015 18:58:41 -0300 (CLT) Date: Thu, 12 Nov 2015 18:58:41 -0300 From: Alvaro Herrera To: Tom Lane Cc: Fujii Masao , Michael Paquier , Haribabu Kommi , brown@fastmail.com, "pgsql-bugs@postgresql.org" Subject: Re: BUG #13741: vacuumdb does not accept valid password Message-ID: <20151112215841.GS614468@alvherre.pgsql> References: <20151104021618.GP6104@alvherre.pgsql> <20151112170303.GN614468@alvherre.pgsql> <15139.1447357263@sss.pgh.pa.us> <20151112212627.GR614468@alvherre.pgsql> <21797.1447365082@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <21797.1447365082@sss.pgh.pa.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.6 (--) 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 Tom Lane wrote: > Alvaro Herrera writes: > > Thanks for the input. I decided to push what we had because it's less > > invasive in terms of API definition. > > I dunno, this might be easier for the callers that don't want password > re-use, but it seems quite horrid for ones that do. The changes to > vacuumdb.c are, frankly, seriously ugly; and they require vacuumdb.c > to know a lot more than before about password handling. Yes, it is ugly. > Other notes are that the strdup() call should surely be pg_strdup(), > and the mix of free() and pg_free() is at best unsightly. I had the same comment, but it turns out that free and strdup must be used instead because sprompt.c uses malloc in the equivalent places; and we can't use pg_malloc there because it's in src/port which isn't allowed to use fe_memutils. We would have to move it from src/port to src/common first. > The place I was thinking we might end up was something like Fujii-san's > patch plus a new bool parameter "allow_password_reuse", which could be > passed as false in cases where the old behavior seems preferable. Hm, we can try that. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs