1

Apparently, I should put postgresql.conf in a separate directory, according to this:

# Note that recovery.conf must be in $PGDATA directory.
# It should NOT be located in the same directory as postgresql.conf

Is there any particular reason? I've seen systems where the two seem to work fine when they're both in the $PGDATA directory.

Parthian Shot
  • 1,155
  • 3
  • 16
  • 32

1 Answers1

3

This comment is meant to users who have postgresql.conf outside of $PGDATA. For instance Debian-based packages for PostgreSQL install the data directory inside /var/lib/postgresql and the configuration files inside /etc/postgresql/.

With that layout, some users could think of putting recovery.conf in the same directory than postgresql.conf, just because it's a config file too. But it's a mistake, it would be ignored.

To be less ambiguous, the second sentence could be:

# It should NOT be located in the same directory as postgresql.conf,
# unless that directory happens to be $PGDATA
Daniel Vérité
  • 2,740
  • 14
  • 19
  • YES! It certainly should say that, especially since the default configuration has postgresql.conf in $PGDATA – medley56 Aug 23 '18 at 19:48