pgsql: Fix assertion failure at end of PITR.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix assertion failure at end of PITR.
Date: 2014-11-28 07:33:00
Message-ID: E1XuG32-0000Ia-6B@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/afeacd274830d1e3d15ffc4e4d4b08a887f76abb

Modified Files
--------------
src/backend/access/transam/xlog.c | 17 +++++++++++++----
src/backend/access/transam/xloginsert.c | 3 ++-
2 files changed, 15 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2014-11-28 12:30:38 pgsql: Add tab-completion for ALTER TABLE ALTER CONSTRAINT in psql.
Previous Message Fujii Masao 2014-11-27 17:45:12 pgsql: Make \watch respect the user's \pset null setting.