OSDN Git Service

Modify MoveOfflineLogs/InstallXLogFileSegment to avoid O(N^2) behavior
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Apr 2005 18:48:10 +0000 (18:48 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Apr 2005 18:48:10 +0000 (18:48 +0000)
commit61b861421b0b849a0dffe36238b8e504624831c1
treee7d99bc9665d20f95c36cd98ad7fe5426696711c
parent348f856dc57902a8f951a570284918761da1776b
Modify MoveOfflineLogs/InstallXLogFileSegment to avoid O(N^2) behavior
when recycling a large number of xlog segments during checkpoint.
The former behavior searched from the same start point each time,
requiring O(checkpoint_segments^2) stat() calls to relocate all the
segments.  Instead keep track of where we stopped last time through.
src/backend/access/transam/xlog.c