1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Observe array length in HaveVirtualXIDsDelayingChkpt().

Since commit f21bb9cfb5, this function
ignores the caller-provided length and loops until it finds a
terminator, which GetVirtualXIDsDelayingChkpt() never adds.  Restore the
previous loop control logic.  In passing, revert the addition of an
unused variable by the same commit, presumably a debugging relic.
This commit is contained in:
Noah Misch
2013-06-12 19:50:14 -04:00
parent ff53890f68
commit fb435f40d5
2 changed files with 15 additions and 20 deletions

View File

@ -6984,12 +6984,9 @@ CreateCheckPoint(int flags)
vxids = GetVirtualXIDsDelayingChkpt(&nvxids);
if (nvxids > 0)
{
uint32 nwaits = 0;
do
{
pg_usleep(10000L); /* wait for 10 msec */
nwaits++;
} while (HaveVirtualXIDsDelayingChkpt(vxids, nvxids));
}
pfree(vxids);