dbTalk Databases Forums  

[BUGS] INDEX_MAX_KEYS too small, need 36 parameters

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] INDEX_MAX_KEYS too small, need 36 parameters in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hans Schou
 
Posts: n/a

Default [BUGS] INDEX_MAX_KEYS too small, need 36 parameters - 07-29-2004 , 11:16 AM







================================================== ==========================
POSTGRESQL BUG REPORT TEMPLATE
================================================== ==========================


Your name : Hans Schou
Your email address : chlor (AT) schou (DOT) dk


System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel Pentium

Operating System (example: Linux 2.4.18) : Linux 2.4.19-36mdk

PostgreSQL version (example: PostgreSQL-7.4.3): PostgreSQL-7.4.3

Compiler used (example: gcc 2.95.2) : gcc 3.2


Please enter a FULL description of your problem:
------------------------------------------------
I needed to have 36 function parameters.
PostgreSQL only allows 32.




Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

create function addhit(
text,text,text,text,text,
text,text,text,text,text,
text,text,text,text,text,
text,text,text,text,text,
text,text,text,text,text,
text,text,text,text,text,
text,text,text,text,text,
text
) returns int4 as '
......



If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------


--- src/include/pg_config_manual.h.orig 2004-07-24 22:13:53.000000000 +0200
+++ src/include/pg_config_manual.h 2004-07-24 22:14:02.000000000 +0200
@@ -53,7 +53,7 @@
*
* Changing these requires an initdb.
*/
-#define INDEX_MAX_KEYS 32
+#define INDEX_MAX_KEYS 64
#define FUNC_MAX_ARGS INDEX_MAX_KEYS

/*


--
Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079
Schou Industries ApS http://schou.dk/ CVR: 26 13 44 39
--------------------------------------------------------------
"Why would you hand...our IP to America gift-wrapped, without
any return?" -- Andrew Tridgell, software patents

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: [BUGS] INDEX_MAX_KEYS too small, need 36 parameters - 07-30-2004 , 12:57 AM






Hans Schou wrote:
Quote:
I needed to have 36 function parameters.
PostgreSQL only allows 32.
If you index more than three or four columns you're doing something
wrong. Please explain in more detail why a practical application would
need that many index columns.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
  #3  
Old   
Hans Schou
 
Posts: n/a

Default Re: [BUGS] INDEX_MAX_KEYS too small, need 36 parameters - 08-05-2004 , 10:47 PM



On Fri, 30 Jul 2004, Peter Eisentraut wrote:

Quote:
Hans Schou wrote:
I needed to have 36 function parameters.
PostgreSQL only allows 32.

If you index more than three or four columns you're doing something
wrong.
Could be.

Quote:
Please explain in more detail why a practical application would need
that many index columns.
I'm taking log-file data from a web-server. First I cut and split the
data with a perl script and I send the data to another machine via the
network. To reduce the traffic I have a stored procedure which get the
splitted data. The stored procedure then does a look-up/create in the
reference tables and stores one record which only contain references
to other tables.

Currently I have used 31 parameters for the most important stuff, and
the last parameter is a text-type which I split inside PLPgsql. You
could say that I then only need one parameter to do it all, but that
would use much more CPU time on the server than it does now (I guess).

My system lay-out:
Apache -> log-file
tail -f log-file | log2sql.pl | psql -h othermachine

'psql' use a lot of CPU time so I might use perl-DBI one day.

/hans
--
Hamletsgade 4 - 201, DK-2200 København N, Phone: +45 3582 9079
Schou Industries ApS http://schou.dk/ CVR: 26 13 44 39
--------------------------------------------------------------
Hint of the day, http://www.w3.org/QA/Tips/iso-date
"Use international date format"

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.