pgsql: Promote the assertion that XLogBeginInsert() is not called twice

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Promote the assertion that XLogBeginInsert() is not called twice
Date: 2015-06-28 19:31:07
Message-ID: E1Z9IIF-0006J3-Cq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Promote the assertion that XLogBeginInsert() is not called twice into ERROR.

Seems like cheap insurance for WAL bugs. A spurious call to
XLogBeginInsert() in itself would be fairly harmless, but if there is any
data registered and the insertion is not completed/cancelled properly, there
is a risk that the data ends up in a wrong WAL record.

Per Jeff Janes's suggestion.

Branch
------
master

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

Modified Files
--------------
src/backend/access/transam/xloginsert.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-06-28 21:03:05 pgsql: Fix markup in docs.
Previous Message Heikki Linnakangas 2015-06-28 19:17:55 pgsql: Fix double-XLogBeginInsert call in GIN page splits.