Skip site navigation (1) Skip section navigation (2)

unite recovery.conf and postgresql.conf

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: unite recovery.conf and postgresql.conf
Date: 2011-09-09 09:56:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

In previous discussion, we've reached the consensus that we should unite
recovery.conf and postgresql.conf. The attached patch does that. The
patch is WIP, I'll have to update the document, but if you notice something,
please feel free to comment.

This patch allows us to specify recovery parameters like primary_conninfo
in postgresql.conf. You can change some of them without restarting
the server (i.e., by using "pg_ctl reload") and see the current settings by
SHOW command. But note that recovery.conf is still required as a status
file for archive recovery and standby server even if you put all the settings
in postgresql.conf. Recovery parameters in postgresql.conf only have effect
when recovery.conf exists.

For backward compatibility, this patch still allows us to specify recovery
parameters in recovery.conf. But, as in past years, you cannot reload
recovery.conf and see the current settings by SHOW command. We should
recommend to put all the settings in postgresql.conf and empty recovery.conf,
but you can also put all recovery parameters in recovery.conf.

If the same parameter is specified in both file, the setting in recovery.conf
overrides that in postgresql.conf. In this case, SHOW command displays
the settings in postgresql.conf even though they are not used at all. Even if
you change the settings in postgresql.conf and reload it, they have no effect
because the settings in recovery.conf are used preferentially.

These limitations on recovery.conf might confuse users. But since most
users will put all the settings in postgresql.conf if we recommend to do that,
I don't think that it's worth complicating the source code for getting rid of
those limitations.



Fujii Masao
NTT Open Source Software Center

Attachment: unite_recoveryconf_postgresqlconf_v0.patch
Description: text/x-patch (42.8 KB)


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2011-09-09 10:21:00
Subject: Re: unite recovery.conf and postgresql.conf
Previous:From: Marti RaudseppDate: 2011-09-09 09:51:23
Subject: Re: [PATCH] Log crashed backend's query (activity string)

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group