Search Postgresql Archives

Re: Replication: How to query current segments allocation relative to "Wal keep segments"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05-01-2015 02:08, Michael Paquier wrote:
On Sun, Jan 4, 2015 at 1:48 AM, Edson Carlos Ericksson Richter
<edsonrichter@xxxxxxxxxxx> wrote:
How to  query current segments allocation relative to "Wal keep segments" in
each master server?
What is your server version? You can have a look at
pg_stat_replication on the master which contains information about the
WAL segments written, flushed and replayed on each slave:
http://www.postgresql.org/docs/devel/static/monitoring-stats.html#PG-STAT-REPLICATION-VIEW

In production servers, 9.3.5.
In development servers, 9.4.0.

I had a quick look at this view before:

Example (on 9.3.5):
postgres=# select * from pg_stat_replication;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | state | sent_location | write_location
 | flush_location | replay_location | sync_priority | sync_state
------+----------+----------+------------------+-------------+-----------------+-------------+------------------------------+-----------+---------------+---------------
-+----------------+-----------------+---------------+------------
2808 | 10 | postgres | walreceiver | 10.68.73.1 | | 36075 | 2015-01-03 20:17:48.53706-02 | streaming | 22/F94D1A90 | 22/F94D1A90
 | 22/F94D1A90    | 22/F94D1A90     |             0 | async
(1 registro)

but in either case (9.3.5, 9.4.0), I get lots of info, but not the count of wal_segments consumed.
Would this kind of count being recorded somewhere else?
How does the server knows that the wal_segments have been exhausted?

Thanks,

Edson




--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux