Re: small smgrcreate cleanup patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: small smgrcreate cleanup patch
Дата
Msg-id 6636.1282275306@sss.pgh.pa.us
обсуждение исходный текст
Ответ на small smgrcreate cleanup patch  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: small smgrcreate cleanup patch  (Robert Haas <robertmhaas@gmail.com>)
Re: small smgrcreate cleanup patch  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> So I propose moving the TablespaceCreateDbspace() call to mdcreate(),
> removing the redundant check from smgrcreate(), and deleting that
> portion of the comment which says this is in the wrong place.

While I don't care for having smgr.c call tablespace.c, moving the call to
md.c instead is surely not an improvement :-(.  The problem here is that
we'd like the tablespace code to be above the smgr code, not below.
Calling it from md.c makes the layer inversion worse not better.

> You could argue that perhaps md.c isn't the right place either, but it
> certainly makes more sense than smgr.c, and I'd argue it's exactly
> right.

On what grounds pray tell?

> A related, interesting question is whether there's any purpose to the
> smgr layer at all.

Not a lot anymore, I think.  This has been ranted about before, but
I think the Berkeley guys bet on the wrong horse when they put an API
layer here.  The facilities that might once have been usefully switched
between at this level are now all down inside kernel device drivers.
I could see merging smgr.c and md.c entirely.  But they'd still be
appropriately placed below, not above, the tablespace commands.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: security hook on authorization
Следующее
От: Steven Schlansker
Дата:
Сообщение: Re: [BUGS] COPY FROM/TO losing a single byte of a multibyte UTF-8 sequence