Skip site navigation (1) Skip section navigation (2)

Picking up strange queries for "pg_catalog"

From: Graham Leggett <minfrin(at)sharp(dot)fm>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Picking up strange queries for "pg_catalog"
Date: 2010-07-04 11:13:49
Message-ID: D1BEEF82-02F2-4CFD-BBD3-EA0AFFA0AFF8@sharp.fm (view raw or flat)
Thread:
Lists: pgsql-jdbc
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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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 <unnamed>: 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
--


Responses

pgsql-jdbc by date

Next:From: Thomas KellererDate: 2010-07-04 11:25:07
Subject: Re: Picking up strange queries for "pg_catalog"
Previous:From: Radosław SmoguraDate: 2010-07-04 09:59:48
Subject: Re: Unable to commit: transaction marked for rollback

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group