Re: 2PC-induced lockup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 2PC-induced lockup
Date: 2007-07-10 14:41:31
Message-ID: 19475.1184078491@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> The following command sequence appears to lock up the database system:
> BEGIN;
> LOCK pg_authid;
> PREPARE TRANSACTION 'foo';
> \q

> After that you can't connect anymore, even in single-user mode. The
> only way I could find is to clear out the pg_twophase directory, but
> I'm not sure whether it is safe to do that.

> Should this be prevented somehow, and is there a better recovery path?

AFAICS this is just one of many ways in which a superuser can shoot
himself in the foot; I'm not eager to try to prevent it.

Right offhand, clearing pg_twophase while the system is stopped should
be safe enough.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-07-10 14:43:22 Re: GSSAPI patch
Previous Message Tom Lane 2007-07-10 14:34:39 Re: Maintaining cluster order on insert