Thread: pg_controldata output documentation

pg_controldata output documentation

From
andy rost
Date:
Is there any documentation on the output from pg_controldata? Most of it
seems intuitive but I would like something definitive on the following
lines:

Latest checkpoint location:           2F9/B38DE758
Prior checkpoint location:            2F9/A3F688F8
Latest checkpoint's REDO location:    2F9/B38DE758
Latest checkpoint's UNDO location:    0/0

Especially, how do I relate this to the file names in the pg_xlog directory.

Thanks ...

Andy

PS - we're relative newbies but getting there
--
--------------------------------------------------------------------------------
Andrew Rost
National Operational Hydrologic Remote Sensing Center (NOHRSC)
National Weather Service, NOAA
1735 Lake Dr. West, Chanhassen, MN 55317-8582
Voice: (952)361-6610 x 234
Fax: (952)361-6634
andy.rost@noaa.gov
http://www.nohrsc.noaa.gov
--------------------------------------------------------------------------------


Re: pg_controldata output documentation

From
Stephen Harris
Date:
On Thu, Dec 07, 2006 at 08:54:22AM -0600, andy rost wrote:
> Is there any documentation on the output from pg_controldata? Most of it
> seems intuitive but I would like something definitive on the following
> lines:
>
> Latest checkpoint location:           2F9/B38DE758
> Prior checkpoint location:            2F9/A3F688F8
> Latest checkpoint's REDO location:    2F9/B38DE758
> Latest checkpoint's UNDO location:    0/0
>
> Especially, how do I relate this to the file names in the pg_xlog directory.

http://www.postgresql.org/docs/8.2/static/functions-admin.html
pg_xlogfile_name_offset() and pg_xlogfile_name_()

eg

testdb=# select pg_xlogfile_name_offset('2F9/B38DE758');
      pg_xlogfile_name_offset
------------------------------------
 (00000001000002F9000000B3,9299800)
(1 row)

testdb=# select pg_xlogfile_name('2F9/B38DE758');
     pg_xlogfile_name
--------------------------
 00000001000002F9000000B3
(1 row)

--

rgds
Stephen