Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Tom Lane
"Nestor A. Diaz" writes: > On 11/21/2014 10:15 AM, Tom Lane wrote: >> Could we see what EXPLAIN says about that? > look at this query (this use partitioning with table inheritance): I asked for an EXPLAIN of the problematic query, not something weakly related to it :-(. However, if these rowcou

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Nestor A. Diaz
On 11/21/2014 10:10 AM, Bill Moran wrote: > Are you saying that the _exact_ same query is executed about one > hundred times at approximately the same time? Hi, I am telling that the query got logged one hundred times in the csv log and also at the postgres log, so I am not sure if the query is e

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Adrian Klaver
On 11/21/2014 06:54 AM, Nestor A. Diaz wrote: On 11/20/2014 12:18 PM, Adrian Klaver wrote: What query? How is it executed? Hi Adrian, this is one of the queries that appear to consume all resources, we use a CTE approach ("with") because in 9.1 _sometimes_ the planner perform an order by befo

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Tom Lane
"Nestor A. Diaz" writes: > As you can see from above it creates a lots of temp files for the same > query. > And finally the query is this: Could we see what EXPLAIN says about that? You might try EXPLAIN ANALYZE too, but we're expecting that to run out of disk space :-(. I'm speculating wildly

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Bill Moran
On Fri, 21 Nov 2014 09:54:43 -0500 "Nestor A. Diaz" wrote: > On 11/20/2014 12:18 PM, Adrian Klaver wrote: > > What query? > > > > How is it executed? > > Hi Adrian, this is one of the queries that appear to consume all > resources, we use a CTE approach ("with") because in 9.1 _sometimes_ the >

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-21 Thread Nestor A. Diaz
On 11/20/2014 12:18 PM, Adrian Klaver wrote: > What query? > > How is it executed? Hi Adrian, this is one of the queries that appear to consume all resources, we use a CTE approach ("with") because in 9.1 _sometimes_ the planner perform an order by before doing the joins something that was killing

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-20 Thread Adrian Klaver
On 11/20/2014 08:20 AM, Nestor A. Diaz wrote: Hello People. I have installed a postgres engine: PostgreSQL 8.4.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.7.2-5) 4.7.2, 64-bit from debian packages at postgresql official repository running on debian wheezy 7.7 64 bit. I have a

Re: [GENERAL] pgsql_tmp consuming all inodes

2014-11-20 Thread Tom Lane
"Nestor A. Diaz" writes: > I have a couple of databases running on a cluster, and two of them have > been experiencing the following behavior since installed yesterday: > They create a lot of files under directory "pgsql_tmp" up to the point > they consume all the inodes, when I do a 'df -i' I fou

[GENERAL] pgsql_tmp consuming all inodes

2014-11-20 Thread Nestor A. Diaz
Hello People. I have installed a postgres engine: PostgreSQL 8.4.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (Debian 4.7.2-5) 4.7.2, 64-bit from debian packages at postgresql official repository running on debian wheezy 7.7 64 bit. I have a couple of databases running on a cluster, and t