X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1AAB252806 for ; Thu, 2 Jun 2005 09:09:20 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82518-01 for ; Thu, 2 Jun 2005 12:09:10 +0000 (GMT) Received: from mx-00.sil.at (mx-00.sil.at [62.116.68.196]) by svr1.postgresql.org (Postfix) with ESMTP id 162A652894 for ; Thu, 2 Jun 2005 09:09:07 -0300 (ADT) Received: (qmail-ldap/ctrl 63131 invoked from network); 2 Jun 2005 12:09:07 -0000 Received: from unknown (HELO io.sonorys.at) ([213.235.243.42]) (envelope-sender ) by mx-00.sil.at (qmail-ldap-1.03) with SMTP for ; 2 Jun 2005 12:09:07 -0000 Received: from neptun.sonorys.at (neptun.sonorys.at [172.24.1.17]) by io.sonorys.at (8.11.7+Sun/8.11.7) with ESMTP id j52C8tG07841; Thu, 2 Jun 2005 14:09:03 +0200 (MEST) Received: by neptun.sonorys.at with Internet Mail Service (5.5.2653.19) id ; Thu, 2 Jun 2005 14:08:55 +0200 Message-ID: From: =?ISO-8859-1?Q?K=D6PFERL_Robert?= To: "'dpandey@secf.com'" , "'Richard Huxton'" Cc: pgsql-general@postgresql.org, "'PostgreSQL'" Subject: Re: [SQL] index row size 2728 exceeds btree maximum, 27 Date: Thu, 2 Jun 2005 14:08:54 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200506/82 X-Sequence-Number: 78790 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=20 (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=E4nner 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,=20 |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=20 |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 =20 |> -----------+-----------------------+----------- |> scan_id | bigint =20 |> host_ip | character varying(15)=20 |> port_num | integer =20 |> plugin_id | integer =20 |> severity | character varying(50)=20 |> data | text =20 |>=20 |> Indexes: |> "pk_scanned_port_info" PRIMARY KEY, btree (scan_id,=20 |host_ip, port_num, |> plugin_id, severity, data) |>=20 |> On inserting record I am getting this error "index row size=20 |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=20 |unlimited-length text-field called "data". | |If the data itself doesn't offer any suitable candidate keys (as can=20 |well be the case) then common practice is to generate a unique number=20 |and use that as an ID - in PostgreSQL's case by use of the SERIAL=20 |pseudo-type. | |Does that help? |--=20 | Richard Huxton | Archonet Ltd | |---------------------------(end of=20 |broadcast)--------------------------- |TIP 7: don't forget to increase your free space map settings | | | |---------------------------(end of=20 |broadcast)--------------------------- |TIP 2: you can get off all lists at once with the unregister command | (send "unregister YourEmailAddressHere" to=20 |majordomo@postgresql.org) |