pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: KÖPFERL Robert <robert.koepferl@sonorys.at>
To: 'dpandey@secf.com' <dpandey@secf.com>
To: 'Richard Huxton' <dev@archonet.com>
Cc: pgsql-general@postgresql.org, "'PostgreSQL'" <pgsql-sql@postgresql.org>
Subject: Re: [SQL] index row size 2728 exceeds btree maximum, 27
Date: Thu, 2 Jun 2005 14:08:54 +0200
Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16736@neptun.sonorys.at> (raw)

To me it seems that the definer of this table missed the concept index ...
or the concept database
One usually looks up data using a key, but if the whole row is the key, what
data shall be looked up.

So short story long: Remove data from your index.  The data column seems
like the data to be looked up using the key 
(scan_id, host_ip, port_num, plugin_id, severity) or even less.
Postgres is able to take several indices over distinct columns into account.
Thus reducing the possible candidates to a hand full.
So several indices are also an option

|-----Original Message-----
|From: Dinesh Pandey [mailto:dpandey@secf.com]
|Sent: Donnerstag, 01. Jänner 2004 11:09
|To: 'Richard Huxton'
|Cc: pgsql-general@postgresql.org; 'PostgreSQL'
|Subject: Re: [SQL] [GENERAL] index row size 2728 exceeds btree maximum,
|2713
|
|
|I am inserting some log messages in the column "data". (Basically I am
|inserting records from reading an xml file)
|
|In the PRIMARY KEY, btree (scan_id, host_ip, port_num, 
|plugin_id, severity,
|data) data is of type TEXT and can contain long string values.
|
|The question is how to remove this error "index row size 2728 
|exceeds btree
|maximum, 2713" by increasing the btree size?
|
|The big problem is "I can not add any additional column in this table."
|
|Thanks
|Dinesh Pandey
|
|-----Original Message-----
|From: pgsql-general-owner@postgresql.org
|[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Richard Huxton
|Sent: Thursday, June 02, 2005 3:29 PM
|To: dpandey@secf.com
|Cc: pgsql-general@postgresql.org; 'PostgreSQL'
|Subject: Re: [GENERAL] index row size 2728 exceeds btree maximum, 2713
|
|Dinesh Pandey wrote:
|> -----------+-----------------------+-----------
|>   Column    |         Type       
|> -----------+-----------------------+-----------
|>  scan_id    | bigint                
|>  host_ip    | character varying(15) 
|>  port_num | integer               
|>  plugin_id  | integer               
|>  severity   | character varying(50) 
|>  data       | text                  
|> 
|> Indexes:
|>     "pk_scanned_port_info" PRIMARY KEY, btree (scan_id, 
|host_ip, port_num,
|> plugin_id, severity, data)
|> 
|> On inserting record I am getting this error "index row size 
|2728 exceeds
|> btree maximum, 2713"
|
|Well - the error message is clear enough. The question is, what to do.
|
|Without knowing what the table "means", it's difficult to say what the 
|primary-key should be, but it seems unlikely to include an 
|unlimited-length text-field called "data".
|
|If the data itself doesn't offer any suitable candidate keys (as can 
|well be the case) then common practice is to generate a unique number 
|and use that as an ID - in PostgreSQL's case by use of the SERIAL 
|pseudo-type.
|
|Does that help?
|-- 
|   Richard Huxton
|   Archonet Ltd
|
|---------------------------(end of 
|broadcast)---------------------------
|TIP 7: don't forget to increase your free space map settings
|
|
|
|---------------------------(end of 
|broadcast)---------------------------
|TIP 2: you can get off all lists at once with the unregister command
|    (send "unregister YourEmailAddressHere" to 
|majordomo@postgresql.org)
|



view thread (18+ messages)  latest in thread

Message-ID: <ED4E30DD9C43D5118DFB00508BBBA76EB16736@neptun.sonorys.at>
Permalink:  ../ED4E30DD9C43D5118DFB00508BBBA76EB16736@neptun.sonorys.at/
Also on:    postgresql.org/message-id/ED4E30DD9C43D5118DFB00508BBBA76EB16736@neptun.sonorys.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: robert.koepferl@sonorys.at, dpandey@secf.com, dev@archonet.com
  Subject: Re: [SQL] index row size 2728 exceeds btree maximum, 27
  In-Reply-To: <ED4E30DD9C43D5118DFB00508BBBA76EB16736@neptun.sonorys.at>
  References: <ED4E30DD9C43D5118DFB00508BBBA76EB16736@neptun.sonorys.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox