Heikki Linnakangas <hlinnakan...@vmware.com> writes: > On 04/28/2014 03:29 PM, Christoph Berg wrote: >> Re: Heikki Linnakangas 2014-04-28 <535e09b7.3090...@vmware.com> >>> I'm using it in the pg_rewind tool. It needs to know how to map relfilenodes >>> to physical files.
>> Isn't pg_rewind so low-level server-close that it needs tons of server >> headers anyway, including one that would still have relpath()? We are >> talking here about what headers pure client apps need. > It knows how to decode WAL, similar to pg_xlogdump. And it knows about > the data directory layout, in particular, how relfilenodes are mapped to > physical files. Those are the low-level parts. So, it certainly needs > some server headers, but I wouldn't call it tons. I'm not even worried about which headers this program uses. What I'm worried about is that you've got CATALOG_VERSION_NO compiled into a non-server executable. Is that really such a great idea? Wouldn't it be better if pg_rewind did not depend on that? (Perhaps it should get the database's catalog version out of the pg_control file, for example.) In short, while I don't deny that there may be non-server programs that need to know about physical file paths, I do strongly doubt that relpath.h/.c in their current form are a good solution to that problem. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers