Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 3A68A1FA2A4B for ; Thu, 26 Jul 2012 06:30:56 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SuKPE-00008I-C1 for pgsql-admin@postgresql.org; Thu, 26 Jul 2012 09:30:55 +0000 Received: by pbbrp8 with SMTP id rp8so2943722pbb.19 for ; Thu, 26 Jul 2012 02:30:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:x-gm-message-state; bh=tAEOzDGcZwK6Jsp0dLmuzogo1P6i2LpR8BHGsPveQ6c=; b=CHmApPlPhN8RvolCwzkKNuIRKUZ3FGNMWuEPdips3Op3U/sg001GH1l0L6rNMihP8V yhfe8Ylk37C+4ENGHTt5Y+6fq/+LQ7atPK+vusr3/PFxq0Xae9OxpXZURwZrRCuFS2iS BI26Tx5KpicSaWaIC0Jlj2o1pyvSvVnCsCmPekMcHjmjWxdLk9a4AgrTFdO2nKbYZ2XC ZOpmzaRv8/7P1U9pjBam+/xFHlL8WwH2ihYDIp0idoNqsGBJNq5cBf6puNN6Cjt/JaP1 1WhogvXLNAB3SwOrZbJmMKLoTeHD+94FoqgPo2WXlf/lBOyJ09N9hmdij+r96KmNJd1u wzGw== Received: by 10.68.231.39 with SMTP id td7mr3820160pbc.3.1343295038805; Thu, 26 Jul 2012 02:30:38 -0700 (PDT) Received: from ayaki.localdomain (office1.postnewspapers.com.au. [150.101.171.128]) by mx.google.com with ESMTPS id se9sm16209336pbc.25.2012.07.26.02.30.36 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 02:30:37 -0700 (PDT) Message-ID: <50110E39.1040601@ringerc.id.au> Date: Thu, 26 Jul 2012 17:30:33 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Thomas Markus CC: pgsql-admin@postgresql.org Subject: Re: problems with access into system catalogs References: <5010F555.9020209@proventis.net> <5010FEF2.3050901@ringerc.id.au> <5011025B.7050003@proventis.net> In-Reply-To: <5011025B.7050003@proventis.net> Content-Type: multipart/alternative; boundary="------------000501050802040005080700" X-Gm-Message-State: ALoCoQn0ng4GZU/dPjx61iFuNpL64PCL+esBt5ZhGpL/Ni1K7nnWgiXAW1/aFy8zxG/rQRbLyh9A X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/88 X-Sequence-Number: 39805 This is a multi-part message in MIME format. --------------000501050802040005080700 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 07/26/2012 04:39 PM, Thomas Markus wrote: > Hi, > > see below > > Am 26.07.2012 10:25, schrieb Craig Ringer: >> - Do you have any uncommitted two phase transactions? Run: >> SELECT * from pg_prepared_xacts ; > hm yes, i stopped all applications this morning but this query shows: > transaction | gid | > prepared | owner | database > -------------+----------------------------------------------------------------------------------------------+-------------------------------+--------+----------- > > 49737548 | > 131075_MS03ZjAwMDAwMTpjZmVlOjRlZDg3MTk2OjY4NGJlN2I=_N2YwMDAwMDE6Y2ZlZTo0ZWQ4NzE5Njo2ODRiZTdm > | 2012-01-05 07:49:30.78583+01 | xxx | db1 > 49737549 | > 131075_MS03ZjAwMDAwMTpjZmVlOjRlZDg3MTk2OjY4NGJlN2I=_N2YwMDAwMDE6Y2ZlZTo0ZWQ4NzE5Njo2ODRiZTg0 > | 2012-01-05 07:49:30.789382+01 | xxx | db2 > > system time is valid (Thu Jul 26 10:38:12 CEST 2012). so may 1st is > really old > Should I restart the instance? Nope, and it wouldn't help anyway. Prepared but uncommitted two phase transactions are a permanent and persistent part of the database. They only go away when a COMMIT PREPARED or ROLLBACK PREPARED is issued. See: http://www.postgresql.org/docs/9.1/static/sql-prepare-transaction.html I cannot advise you on what to do without knowing what created those transactions and why. >> Do you very frequently create and drop tables, indexes, etc? Say, >> using a database unit testing framework? > no, its a live system with normal olap access Weird, then I don't know how the catalogs would get so fat. I don't think temporary tables create writes to the catalog heap, but I can't think what else it'd be. -- Craig Ringer --------------000501050802040005080700 Content-Type: text/html; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit
On 07/26/2012 04:39 PM, Thomas Markus wrote:
Hi,

see below

Am 26.07.2012 10:25, schrieb Craig Ringer:
- Do you have any uncommitted two phase transactions?  Run:
  SELECT * from pg_prepared_xacts ;
hm yes, i stopped all applications this morning but this query shows:
 transaction | gid                                              | prepared            | owner  | database
-------------+----------------------------------------------------------------------------------------------+-------------------------------+--------+-----------
    49737548 | 131075_MS03ZjAwMDAwMTpjZmVlOjRlZDg3MTk2OjY4NGJlN2I=_N2YwMDAwMDE6Y2ZlZTo0ZWQ4NzE5Njo2ODRiZTdm | 2012-01-05 07:49:30.78583+01  | xxx | db1
    49737549 | 131075_MS03ZjAwMDAwMTpjZmVlOjRlZDg3MTk2OjY4NGJlN2I=_N2YwMDAwMDE6Y2ZlZTo0ZWQ4NzE5Njo2ODRiZTg0 | 2012-01-05 07:49:30.789382+01 | xxx | db2

system time is valid (Thu Jul 26 10:38:12 CEST 2012). so may 1st is really old
Should I restart the instance?

Nope, and it wouldn't help anyway. Prepared but uncommitted two phase transactions are a permanent and persistent part of the database. They only go away when a COMMIT PREPARED  or ROLLBACK PREPARED is issued. See:

  http://www.postgresql.org/docs/9.1/static/sql-prepare-transaction.html

I cannot advise you on what to do without knowing what created those transactions and why.

Do you very frequently create and drop tables, indexes, etc? Say, using a database unit testing framework?
no, its a live system with normal olap access

Weird, then I don't know how the catalogs would get so fat.

I don't think temporary tables create writes to the catalog heap, but I can't think what else it'd be.

--
Craig Ringer
--------------000501050802040005080700--