Re: cleanup smgr.c of tablespace call - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: cleanup smgr.c of tablespace call
Date
Msg-id 496F4DFB.9060609@enterprisedb.com
Whole thread Raw
In response to cleanup smgr.c of tablespace call  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> Hi,
> 
> This trivial patch moves a misplaced tablespace.c call from smgr.c into
> the newly created storage.c.  This is appropriate because smgr.c is
> supposed to be bare metal, and storage.c has the high-level calls.

None of the existing functions in storage.c have SMgrRelation in the 
signature, that seems out of place.

When creating an extra fork for FSM or VM, the main fork should already 
exist, so the TablespaceCreateDbspace call is not necessary.

If you want to move the TablespaceCreateDbspace call to a higher level, 
I think you could just add it to RelationCreateStorage and 
XLogReadBufferExtended.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tuplestore potential performance problem
Next
From: "Jaime Casanova"
Date:
Subject: Re: New patch for Column-level privileges