On Tue, Jan 26, 2010 at 9:08 AM, Simon Riggs <[email protected]> wrote:
> Just committed a fix: the server no longer requests 0000000001.history
> at start of archive recovery.
Good.
And I think that writeTimeLineHistory() should also skip the request
of 0000000001.history. Here is the patch to do so. Comments?
Regards,
--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 4335,4340 **** writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
--- 4335,4344 ----
(errcode_for_file_access(),
errmsg("could not create file \"%s\": %m", tmppath)));
+ /* Timeline 1 does not have a history file, so no need to copy */
+ if (parentTLI == 1)
+ goto append_newtli;
+
/*
* If a history file exists for the parent, copy it verbatim
*/
***************
*** 4391,4396 **** writeTimeLineHistory(TimeLineID newTLI, TimeLineID parentTLI,
--- 4395,4401 ----
close(srcfd);
}
+ append_newtli:
/*
* Append one line with the details of this timeline split.
*
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers