0-byte 2PC File

From: Vincent Lau <vincent(dot)lau(at)rentrakmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: 0-byte 2PC File
Date: 2013-07-13 23:41:23
Message-ID: CAF_O_rm3fxuYzRx8=kg0RUGjw+=PaZ0+p1V2=5PSYu9wLrZtQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello!

We are running 8.4.13 on this particular database and recently we have been
getting empty two phase commit state files inside the pg_twophase
directory. These prepared transactions can't be rolled back due to the
empty state file. Here is an example of the error message.

ERROR: two-phase state file for transaction 121421120 is corrupt

The only way to get rid of this is to restart the database, which is just a
bandaid solution at this point.

Have you guys seen this before? I have googled for this but can't seem to
find a single instance of this happening to anyone.

I sure will work with our developers to see where in our code is generating
this file and go from there. But in the mean time, do you guys have any
idea on how I should pursuit this on the database side of things?

Here is a little more info about one of the empty file. It does look like
the file was created empty.

-bash-3.2$ stat 073CBD40
File: `073CBD40'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 830h/2096d Inode: 100663469 Links: 1
Access: (0600/-rw-------) Uid: ( 499/postgres) Gid: ( 402/ dba)
Access: 2013-07-12 23:05:48.369557197 -0700
Modify: 2013-07-12 23:05:48.398557197 -0700
Change: 2013-07-12 23:05:48.398557197 -0700

Any help is appreciated and I'd be more than happy to provide more info.

Thanks!

--
Vincent Lau | Database Administrator
503.284.7581 x394 | vincent(dot)lau(at)rentrak(dot)com <vincent(dot)lau(at)rentrakmail(dot)com>
RENTRAK | www.rentrak.com | NASDAQ: RENT

Notice: This message is confidential and is intended only for the
recipient(s) named above. If you have received this message in error,
or are not the named recipient(s), please immediately notify the
sender and delete this message.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2013-07-14 16:19:34 Re: 0-byte 2PC File
Previous Message Jerry Sievers 2013-07-12 18:14:53 Re: Couldn't start postgres, got no logging, ran postgres manually for info-- help?