pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Ryan Johnson <ryan.johnson@cs.utoronto.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: SSI slows down over time
Date: Mon, 14 Apr 2014 08:54:03 -0700 (PDT)
Message-ID: <1397490843.97407.YahooMailBasic@web122304.mail.ne1.yahoo.com> (raw)
In-Reply-To: <534BEF32.9060309@cs.utoronto.ca>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Ryan Johnson <ryan.johnson@cs.utoronto.ca> wrote:

> what factors might cause a prepared transaction to exist in the
> first place?

As part of a "distributed transaction" using "two phase commit" a
PREPARE TRANSACTION statement would have had to run against
PostgreSQL:

http://www.postgresql.org/docs/current/interactive/sql-prepare-transaction.html

> I'm running a single-node db, and I've had only normal database
> shutdowns, so I wouldn't have expected any.

Prepared transactions survive shutdowns, normal or not, so that
doesn't matter; but prepared transactions are normally used with a
transaction manager coordinating transactions among multiple data
stores.  On the other hand, I have seen cases where a developer
"playing around" with database features has created one.  And using
them with a "home-grown" transaction manager rather than a mature
product is risky; there are some non-obvious pitfalls to avoid.

Anyway, you may have found a bug, but most of what you're seeing
could be caused by a prepared transaction sitting around
indefinitely, so it's something to check before looking at other
possible causes.  If you have a way to reproduce this from a new
cluster, please share it.  That always makes diagnosis much easier.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (15+ messages)  latest in thread

Message-ID: <1397490843.97407.YahooMailBasic@web122304.mail.ne1.yahoo.com>
Permalink:  ../1397490843.97407.YahooMailBasic@web122304.mail.ne1.yahoo.com/
Also on:    postgresql.org/message-id/1397490843.97407.YahooMailBasic@web122304.mail.ne1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kgrittn@ymail.com, ryan.johnson@cs.utoronto.ca
  Subject: Re: SSI slows down over time
  In-Reply-To: <1397490843.97407.YahooMailBasic@web122304.mail.ne1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox