| From: | Edson Carlos Ericksson Richter <edsonrichter(at)hotmail(dot)com> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Replication: How to query current segments allocation relative to "Wal keep segments"? | 
| Date: | 2015-01-05 09:51:42 | 
| Message-ID: | BLU436-SMTP166099D4BDAD8C0C36CBECDCF580@phx.gbl | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On 05-01-2015 02:08, Michael Paquier wrote:
> On Sun, Jan 4, 2015 at 1:48 AM, Edson Carlos Ericksson Richter
> <edsonrichter(at)hotmail(dot)com> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2015-01-05 12:02:25 | Re: Replication: How to query current segments allocation relative to "Wal keep segments"? | 
| Previous Message | Michael Paquier | 2015-01-05 04:08:17 | Re: Replication: How to query current segments allocation relative to "Wal keep segments"? |