On 06/25/2012 11:40 AM, Rob Cowell wrote:
Why would the output from ‘ls’ show older filenames (0....1....3D...xx)
as newer in date than the “0....1....3F...xx” filenames?

Does Postgres re-cycle old log filenames ?

It recycles old log files. If you turn on log_checkpoints, you can see how many and how often. It will list a count of recycled WAL files at each checkpoint, along with how many of the old ones were just deleted instead.

The weird pattern in the timestamps you're seeing is a state in the middle of doing that, and yes they look quite weird sometimes. The files are noteed as reusable, get re-initialized to hold new data (they're not overwritten completely with zeros like new WAL files are), and renamed to a new segment number. And each of those steps has a corresponding flush to disk step which makes sure the filesystem metadata is updated. Some of the middle states there are unusual.

Does the output from ‘ps’ mean the master/slave are in sync, or is the
slave really still playing catchup (based on the names of the logfiles
in pg_xlog) ?

Your example was in sync, with the file names just being odd due to the implementation of WAL file recycling. You might also check pg_stat_replication to get an easier view of things, rather than relying on ps. ps is correct, it's just harder to check.


--
Greg Smith   2ndQuadrant US    g...@2ndquadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

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

Reply via email to