From: | Asim R P <apraveen(at)pivotal(dot)io> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | ERROR after writing PREPARE WAL record |
Date: | 2019-07-17 12:46:55 |
Message-ID: | CANXE4TcyYvAjvyNyCJuij1y=xQ6ZPwDJGo84jz=yecB0E=CNPQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
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).
And if that happens after PREPARE WAL record is written and before
transaction state is cleaned up, normal abort processing is triggered, i.e.
AbortTransaction(). It is not correct to perform abort transaction
workflow against a transaction that is already marked as prepared. A
prepared transaction should only be finished using "COMMIT/ROLLBACK
PREPARED" operation.
I tried injecting an elog(ERROR) at the end of EndPrepare() and that
resulted in a PANIC at some point.
Before delving into more details, I want to ascertain that this is a valid
problem to solve. Is the above problem worth worrying about?
Asim
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Glukhov | 2019-07-17 13:26:55 | Re: Ltree syntax improvement |
Previous Message | Andrew Dunstan | 2019-07-17 12:08:15 | Re: buildfarm's typedefs list has gone completely nutso |