Fix assertion failure at end of PITR.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: afeacd274830d1e3d15ffc4e4d4b08a887f76abb
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2014-11-28T07:31:53Z
Releases: 9.5.0
Fix assertion failure at end of PITR.

InitXLogInsert() cannot be called in a critical section, because it
allocates memory. But CreateCheckPoint() did that, when called for the
end-of-recovery checkpoint by the startup process.

In the passing, fix the scratch space allocation in InitXLogInsert to go to
the right memory context. Also update the comment at InitXLOGAccess, which
hasn't been totally accurate since hot standby was introduced (in a hot
standby backend, InitXLOGAccess isn't called at backend startup).

Reported by Michael Paquier

Files