Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 47B9A632672 for ; Sun, 4 Jul 2010 08:14:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 10867-06 for ; Sun, 4 Jul 2010 11:13:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from chandler.sharp.fm (chandler.sharp.fm [72.32.122.20]) by mail.postgresql.org (Postfix) with ESMTP id BC1AF63237C for ; Sun, 4 Jul 2010 08:13:52 -0300 (ADT) Received: from chandler.sharp.fm (localhost [127.0.0.1]) by chandler.sharp.fm (Postfix) with ESMTP id 3DA671B803D for ; Sun, 4 Jul 2010 06:13:51 -0500 (CDT) Received: from 87-194-125-16.bethere.co.uk (87-194-125-16.bethere.co.uk [87.194.125.16]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: minfrin@sharp.fm) by chandler.sharp.fm (Postfix) with ESMTP id B217E780D8 for ; Sun, 4 Jul 2010 06:13:50 -0500 (CDT) Message-Id: From: Graham Leggett To: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Picking up strange queries for "pg_catalog" Date: Sun, 4 Jul 2010 13:13:49 +0200 X-Mailer: Apple Mail (2.936) X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_40=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/18 X-Sequence-Number: 20683 Hi all, While investigating some performance issues with a database, I have been analysing the database queries, and have discovered that I am getting thousands and thousands of queries that look like the ones below. Asking on the pgsql-general list, I was pointed in the direction of the jdbc driver, which in theory is making these queries, but not caching them. Does this look familiar to anybody? In addition to this, I am using the atomikos XA transaction manager, could this be the source of these queries? Is there anything I can do to stop these queries being made? 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '4' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '4' 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '5' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '5' 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '8' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '8' 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '9' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '9' 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '7' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '7' 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '10' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '10' 2010-07-03 23:49:31 SAST LOG: execute : SELECT attnotnull FROM pg_catalog.pg_attribute WHERE attrelid = $1 AND attnum = $2 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '6' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '6' Regards, Graham --