Hello,
> Ok, I'm doing modify it to reset backup locations by default and
> remove the new option '-b' to do that. Since this seems looking
> to be a bug for the poeple, I'll provide backpatches back
> to... 8.4? (Final release of 8.4 is scheduled at July 2014)
I looked closer to pg_resetxlog and found I'm feeling discomfort
of its behavior.
"pg_resetxlog -n", which is explained in its help that "no
update, just show what would be done (for testing) ", shows
current values then values to be changed, like this.
| Current pg_control values:
|
| pg_control version number: 942
| Catalog version number: 201406181
| Database system identifier: 6026883474640211951
| Latest checkpoint's TimeLineID: 1
| Latest checkpoint's full_page_writes: on
| Latest checkpoint's NextXID: 0/1831
| Latest checkpoint's NextOID: 32772
| Latest checkpoint's NextMultiXactId: 1
| Latest checkpoint's NextMultiOffset: 0
| Latest checkpoint's oldestXID: 1800
| Latest checkpoint's oldestXID's DB: 1
| Latest checkpoint's oldestActiveXID: 0
| Latest checkpoint's oldestMultiXid: 1
| Latest checkpoint's oldestMulti's DB: 1
| Maximum data alignment: 8
...
| Values to be changed:
|
| First log segment after reset: 00000001000000000000000C
But "pg_resetxlog -f" made the change as below,
| *** /tmp/1.txt 2014-06-25 10:49:42.269336739 +0900
| --- /tmp/2.txt 2014-06-25 10:49:49.780266229 +0900
| ***************
| *** 5,9 ****
| ! pg_control last modified: Wed 25 Jun 2014 10:45:20 AM JST
| ! Latest checkpoint location: 0/B8DE1A0
| ! Prior checkpoint location: 0/B8DE138
| ! Latest checkpoint's REDO location: 0/B8DE1A0
| ! Latest checkpoint's REDO WAL file: 00000001000000000000000B
| --- 5,9 ----
| ! pg_control last modified: Wed 25 Jun 2014 10:49:46 AM JST
| ! Latest checkpoint location: 0/C000028
| ! Prior checkpoint location: 0/0
| ! Latest checkpoint's REDO location: 0/C000028
| ! Latest checkpoint's REDO WAL file: 00000001000000000000000C
| ***************
| *** 22 ****
| ! Time of latest checkpoint: Wed 25 Jun 2014 10:45:20 AM JST
| --- 22 ----
| ! Time of latest checkpoint: Wed 25 Jun 2014 10:49:46 AM JST
There are some changes which haven't been shown by '-n' option,
even not displayed at all. I think these should be shown by
'-n'. I suppose this is a kind of bug but fixing it seems to be a
kind of 'feature change'..
Any suggestions?
reagrds,
--
Kyotaro Horiguchi
NTT Open Source Software Center