Search Postgresql Archives

Re: lots of values for IN() clause

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't get a segfault on 8.0.8 under linux or 8.1.4 under win32.  The backend (correctly I assume) issues a hint to increase max_stack_depth in both cases.

$ psql -h localhost -p 5432 -d test -U readwrite < script.sql

Password: 

CREATE TABLE

ERROR:  stack depth limit exceeded

HINT:  Increase the configuration parameter "max_stack_depth".

DROP TABLE

Regards,

Shelby Cain

----- Original Message ----
From: Markus Schiltknecht <markus@xxxxxxxxxx>
To: pgsql general <pgsql-general@xxxxxxxxxxxxxx>
Sent: Thursday, November 2, 2006 9:21:52 AM
Subject: [GENERAL] lots of values for IN() clause

Hi,

One of our PostgreSQL 8.1.5 databases constantly crashed on a certain 
query (backend SEGFAULTs). I've figured the crashes were caused by a 
very long IN() clause.

You can easily reproduce the crash by feeding the output of the python 
script below to your database.

Fortunately, 8.2 (as of 09/19/2006) no longer crashes. Anyway, I think 
it would be helpful to have at least a better error message instead of a 
SEGFAULT for 8.1. I didn't test earlier versions.

Regards

Markus


python script mentioned:

#!/usr/bin/python

values = 100000

print "CREATE TABLE test (a INT, b INT);"
print "SELECT a, b FROM test WHERE b IN (" + \
    ",".join([str(x) for x in range(values)]) + \
    ");"
print "DROP TABLE test;"

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match







[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux