Re: ERROR after writing PREPARE WAL record - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ERROR after writing PREPARE WAL record
Date
Msg-id 26087.1563370640@sss.pgh.pa.us
Whole thread Raw
In response to ERROR after writing PREPARE WAL record  (Asim R P <apraveen@pivotal.io>)
Responses Re: ERROR after writing PREPARE WAL record  (Asim R P <apraveen@pivotal.io>)
List pgsql-hackers
Asim R P <apraveen@pivotal.io> writes:
> Cancel/terminate requests are held off during "PREPARE TRANSACTION"
> processing in function PrepareTransaction().  However, a subroutine invoked
> by PrepareTransaction() may perform elog(ERROR) or elog(FATAL).

Doing anything that's likely to fail in the post-commit code path is
a Bad Idea (TM).  There's no good recovery avenue, so the fact that
you generally end up at a PANIC is expected/intentional.

The correct response, if you notice code doing that, is to fix it so
it doesn't do that.  Typically the right answer is to move the
failure-prone operation to pre-commit processing.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nikita Glukhov
Date:
Subject: Re: Ltree syntax improvement
Next
From: Jeevan Chalke
Date:
Subject: Re: block-level incremental backup