Обсуждение: cleanup smgr.c of tablespace call

Поиск
Список
Период
Сортировка

cleanup smgr.c of tablespace call

От
Alvaro Herrera
Дата:
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.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Вложения

Re: cleanup smgr.c of tablespace call

От
Heikki Linnakangas
Дата:
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