From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
Cc: | "pgsql-patches" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Refactoring xlogutils.c |
Date: | 2008-06-11 13:56:03 |
Message-ID: | 6290.1213192563@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> writes:
> Tom Lane wrote:
>> The code motion in md.c looks fairly bogus; was that a copy-and-paste
>> error?
> That's intentional. That check has been moved to smgrcreate(), so that
> it's done before calling TablespaceCreateDbSpace(). The reason for that
> is that smgrcreate() is now called for every XLogReadBuffer()
> invocation, so we want to make it exit quickly if there's nothing to do.
Oh, I see --- I misread the patch the first time. That seems like a
reasonable change.
> On second look though, I think we should actually leave that check in
> mdcreate(). Even though it'd be dead code since we do the same check in
> smgrcreate already, removing it changes the semantics of mdcreate():
> it'd no longer be acceptable to call mdcreate() if the file is open already.
I don't believe there is any way to call mdcreate except through
smgrcreate, so this is probably not a problem.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-06-11 22:07:45 | Re: Tentative patch for making DROP put dependency info in DETAIL |
Previous Message | Heikki Linnakangas | 2008-06-11 06:20:35 | Re: Refactoring xlogutils.c |