pgsql: Fix assertion failure at end of PITR. - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Fix assertion failure at end of PITR.
Date
Msg-id E1XuG32-0000Ia-6B@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Make \watch respect the user's \pset null setting.
Next
From: Fujii Masao
Date:
Subject: pgsql: Add tab-completion for ALTER TABLE ALTER CONSTRAINT in psql.