TODO: replica information functions
Hackers,
Since merging recovery.conf with postgresql.conf is apparently off the
table indefinitely, we could really use some additional information
functions which work on the replica. Here's my list of what I need for
failover automation:
pg_standby_is_streaming()
returns true if the standby is configured for streaming and
is currently connected with the master.
returns false if the connection to the master is broken,
of if there is no primary_conninfo
pg_standby_conninfo()
returns connection string to master. Superuser-only for
previously discussed reasons
pg_recovery_config(config_item TEXT)
returns the specified configuration item from recovery.conf
superuser-only?
Does this make sense? Is there other information we need?
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2015-07-28 11:35:52 -0700, Josh Berkus wrote:
Since merging recovery.conf with postgresql.conf is apparently off the
table indefinitely
Off the table as in "somebody needs to actually work on it instead of
just talking about it".
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 28 Jul 2015, at 21:35, Josh Berkus <josh@agliodbs.com> wrote:
Hackers,
Since merging recovery.conf with postgresql.conf is apparently off the
table indefinitely, we could really use some additional information
functions which work on the replica. Here's my list of what I need for
failover automation:pg_standby_is_streaming()
returns true if the standby is configured for streaming and
is currently connected with the master.
returns false if the connection to the master is broken,
of if there is no primary_conninfo
I believe we should have some function to tell if standby is configured for streaming
and another function to tell if everything is okay.
pg_standby_conninfo()
returns connection string to master. Superuser-only for
previously discussed reasonspg_recovery_config(config_item TEXT)
returns the specified configuration item from recovery.conf
superuser-only?Does this make sense? Is there other information we need?
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 28-07-2015 15:35, Josh Berkus wrote:
pg_standby_is_streaming()
returns true if the standby is configured for streaming and
is currently connected with the master.
returns false if the connection to the master is broken,
of if there is no primary_conninfo
+1.
pg_standby_conninfo()
returns connection string to master. Superuser-only for
previously discussed reasons
-1. It could be retrieved using the proposal below.
pg_recovery_config(config_item TEXT)
returns the specified configuration item from recovery.conf
superuser-only?
pg_recovery_config(OUT name text, OUT setting text) SETOF record
or
pg_recovery_config(OUT name text, OUT setting text, IN all bool) SETOF
record
This function covers pg_standby_conninfo().
--
Euler Taveira Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers