Re: initdb -S and tablespaces - Mailing list pgsql-hackers

From Robert Haas
Subject Re: initdb -S and tablespaces
Date
Msg-id CA+TgmobEDoqpAQZkFvusMa91fsUtJVx42wdTyKLK2hGu0YForw@mail.gmail.com
Whole thread Raw
In response to Re: initdb -S and tablespaces  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: initdb -S and tablespaces  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Thu, Apr 30, 2015 at 6:18 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
>> Also, it seems awfully unfortunate to me that we're duplicating a
>> whole pile of code into xlog.c here.  Maybe there's no way to avoid
>> the code duplication, but pre_sync_fname() seems like it'd more
>> naturally go in fd.c than here.  I dunno where walkdir should go, but
>> again, not in xlog.c.
>
> Hm, there's an interest in backpatching this as a bugfix, if I
> understand correctly; hence the duplicated code.  We could remove the
> duplicity later with a refactoring patch in master only.

That seems pretty silly.  If we going to add pre_sync_fname() to every
branch, we should add it to the same (correct) file in all of them,
not put it in xlog.c in the back-branches and fd.c in master.

> However, now that you mention a pg_control flag, it becomes evident to
> me that a change to pg_control cannot be back-patched ...

Indeed.  But I think we can solve that problem by just ripping that
part out.  Unless I'm missing something, it's not really doing
anything useful.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: PATCH: adaptive ndistinct estimator v4
Next
From: Joe Wildish
Date:
Subject: Implementing SQL ASSERTION