Frontends including fd.h

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Frontends including fd.h
Date: 2018-12-01 00:02:17
Message-ID: 20181201000217.GA1093@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

We have a couple of frontend binaries (pg_rewind, and now
pg_verify_checksums) including directly fd.h to get the definitions of
PG_TEMP_FILES_DIR and PG_TEMP_FILE_PREFIX. This is a poor choice I
think, because fd.h is aimed at being used by the backend, and there
are some routines declared there which could conflict with their
frontend equivalents, like the various wrappers for fsync.

I have suggested a couple of months ago to have a specific header for
path-related variables, which I called src/include/pg_paths.h, but not
many people liked that. Perhaps it would be time to bite the bullet, I
think that we are on a path where problems are going to show up for
frontends. At least PG_TEMP_FILES_DIR and PG_TEMP_FILE_PREFIX could be
moved to it to remove all the existing problems.

Thoughts or opinions?
--
Michael

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-12-01 00:02:56 Re: [PATCH] Log CSV by default
Previous Message Dmitry Dolgov 2018-11-30 23:53:21 Re: Reviving the "Stopping logical replication protocol" patch from Vladimir Gordichuk