pgsql: Don't allocate memory inside an Assert() iff in a critical secti

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't allocate memory inside an Assert() iff in a critical secti
Date: 2014-05-25 15:57:27
Message-ID: E1Woanf-0002V6-6G@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't allocate memory inside an Assert() iff in a critical section.

HeapTupleHeaderGetCmax() asserts that it is only used if the tuple has
been updated by the current transaction. That check is correct and
sensible but requires allocating memory if xmax is a multixact. When
wal_level is set to logical cmax needs to be included in a wal record
, generated inside a critical section, which can trigger the assertion
added in 4a170ee9e.

Reported-By: Steve Singer

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9fa93530c878a0e23147a65f7d9a62802b22a995

Modified Files
--------------
src/backend/utils/time/combocid.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-05-25 20:34:22 pgsql: Allow total number of transactions in pgbench to exceed INT_MAX.
Previous Message Robert Haas 2014-05-24 21:10:57 Re: pgsql: Silence a couple of spurious valgrind warnings in inval.c.