Re: includedir_internal headers are not self-contained

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: includedir_internal headers are not self-contained
Дата
Msg-id 25520.1398713552@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: includedir_internal headers are not self-contained  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: includedir_internal headers are not self-contained  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: includedir_internal headers are not self-contained  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I have to admit it's been a few years since I've had to play with
> WAL_DEBUG, so I don't really remember what I was trying to do.  But I
> don't see any real argument that three slash-separated numbers will be
> more useful to somebody who has to dig through this than a pathname,
> even an approximate pathname, and I think people wanting to figure out
> approximately where they need to look to find the data affected by the
> WAL record will be pretty common among people decoding WAL records.

Meh.  I still think it's a bad idea to have CATALOG_VERSION_NO getting
compiled into libpgcommon.a, where there will be no way to cross-check
that it matches anything.  But I guess I'm losing this argument.

However, we've absolutely got to get that reference out of
common/relpath.h.  The usage of RelFileNode there is problematic
as well.

How about we change common/relpath.[hc] to export a single version of
relpath() that takes its arguments as separate plain OIDs, and then
make the other versions wrappers that are only declared in some
backend header?  The wrappers could possibly be macros, allowing
things like pg_xlogdump to keep using them as long as they didn't
mind importing backend headers.  (Though for the RelFileNode case this
would imply multiple evaluation of the macro argument, so maybe it's
not such a great idea.)
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: includedir_internal headers are not self-contained
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: bgworker crashed or not?