amélioration section recovery.conf

This commit is contained in:
Daniel Jakots 2017-12-12 20:00:48 -05:00
parent 6d0e8f8e50
commit 46efe8e3df

View file

@ -72,16 +72,16 @@ Décommenter ou ajouter les directives suivantes dans le fichier _/etc/postgresq
hot_standby = on
~~~
Créer un fichier _recovery.conf_ avec les info suivantes :
Créer un fichier _recovery.conf_ situé dans le datadir avec les info suivantes :
~~~
# echo "standby_mode = 'on'
> primary_conninfo = 'host=192.0.2.1 user=repl password=xxxxxxxx application_name=foo'
> archive_cleanup_command = '/usr/lib/postgresql/9.X/bin/pg_archivecleanup /srv/pg-archives/ %r'
> recovery_target_timeline = 'latest'" >~postgres/9.X/main/recovery.conf
standby_mode = 'on'
primary_conninfo = 'host=192.0.2.1 user=repl password=xxxxxxxx application_name=foo'
archive_cleanup_command = '/usr/lib/postgresql/9.X/bin/pg_archivecleanup /srv/pg-archives/ %r'
recovery_target_timeline = 'latest'
~~~
Il est nécessaire que ce fichier appartiennent à l'utilisateur _postgres_, notamment pour le <https://wiki.evolix.org/HowtoPostgreSQLStreamingReplication#passer-un-serveur-r%C3%A9plicat-en-ma%C3%AEtre> :
Il est nécessaire que ce fichier appartienne à l'utilisateur _postgres_, notamment en cas de promotion en master (car postgresql va renommer le fichier en recovery.done.
~~~
# chown postgres:postgres ~postgres/9.X/main/recovery.conf