Re: Renaming some binaries - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Renaming some binaries
Date
Msg-id 518d98a9-9c75-6cf5-8283-e8bc9af9f6a0@2ndquadrant.com
Whole thread Raw
In response to Re: Renaming some binaries  (David Fetter <david@fetter.org>)
List pgsql-hackers
On 08/26/2016 07:03 PM, David Fetter wrote:
> On Fri, Aug 26, 2016 at 01:26:39PM -0300, Euler Taveira wrote:
>> Hi,
>>
...>>
>> initdb: we already have 'pg_ctl init' (since 9.0) and could remove initdb.
>>
>> Opinions?
>
> +1 for removing initdb.
>

We can't just remove it because pg_ctl actually calls initdb, so we 
would have to move the code from src/bin/initdb to src/bin/pg_ctl. Which 
is doable, but I assume we'd also change how we pass parameters to it - 
right now we have to do this:

pg_ctl init -o "... initdb params ..."

But I assume we'd change this to regular parameters, if 'init' gets 
merged into pg_ctl - otherwise we'd force users to construct the param 
string only to immediately parse it (currently the "system()" call does 
that for us, but we'd have to implement that in pg_ctl).

That however means that not only we break the scripts for all those 
calling initdb directly (and there's quite a few of them, I'm sure, 
exactly because it's simpler to pass the parameters directly), but also 
for all those already using pg_ctl.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Renaming some binaries
Next
From: David Fetter
Date:
Subject: Re: Renaming some binaries