Re: initdb -S and tablespaces

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: initdb -S and tablespaces
Дата
Msg-id
20140929105909.GE4716@alap3.anarazel.de
Ответ на
Re: initdb -S and tablespaces (Abhijit Menon-Sen)
Список
Дерево обсуждения
initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Andres Freund <andres@2ndquadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Andres Freund <andres@2ndquadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Andres Freund <andres@2ndquadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Andres Freund <andres@2ndquadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Alvaro Herrera <alvherre@2ndquadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Alvaro Herrera <alvherre@2ndquadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Alvaro Herrera <alvherre@2ndquadrant.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Alvaro Herrera <alvherre@2ndquadrant.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Tom Lane <tgl@sss.pgh.pa.us>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Andres Freund <andres@anarazel.de>
Re: initdb -S and tablespaces Abhijit Menon-Sen <ams@2ndQuadrant.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Andres Freund <andres@anarazel.de>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Andres Freund <andres@anarazel.de>
Re: initdb -S and tablespaces Tom Lane <tgl@sss.pgh.pa.us>
Re: initdb -S and tablespaces David Rowley <dgrowleyml@gmail.com>
Re: initdb -S and tablespaces Robert Haas <robertmhaas@gmail.com>
Re: initdb -S and tablespaces Andres Freund <andres@2ndquadrant.com>
On 2014-09-29 15:43:32 +0530, Abhijit Menon-Sen wrote:
> At 2014-09-29 11:54:10 +0200, andres@2ndquadrant.com wrote:
> >
> > Note that the perform_fsync() *was* ok for its original purpose in
> > initdb. At the end of initdb there's no relevant tablespaces. But if
> > used *after* pg_upgrade, that's not necessarily the case.
> 
> Right.
> 
> So, since I'm writing a function to fsync everything inside PGDATA
> anyway, it makes sense to call it both from initdb and StartupXLOG.
> It'll do what initdb -S now does, plus follow links in pg_tblspc.
> 
> Any suggestions about where to put such a function? (I was looking at
> backend/utils/init, but I'm not sure that's a good place for this.)

That can't work unfortunately. Both frontend and backend code need to
execute it... I'm not sure it's realistic to handle both cases the
same. The error handling, opening files/directories, and all will be
different. It'll also make backpatching hard :(.

So I'm afraid at least in a first patch it'll need to be a bit of
duplication. Fixing initdb's code back to 9.3 and the backend all the
way back to 9.0.

Greetings,

Andres Freund

-- Andres Freund	                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-hackers по дате отправления
От: Andres Freund
Дата:
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: initdb -S and tablespaces
FAQ