Re: ERROR row is too big size 9336, exceeds size 8160 when populating record with tsquery and tsvector fields

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Allan Kamau <kamauallan(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: ERROR row is too big size 9336, exceeds size 8160 when populating record with tsquery and tsvector fields
Date: 2010-11-18 15:28:18
Message-ID: 29927.1290094098@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Allan Kamau <kamauallan(at)gmail(dot)com> writes:
> CREATE TABLE farm.produce
> (id INTEGER NOT NULL DEFAULT NEXTVAL('farm.produce_seq')
> ,process___id TEXT NOT NULL
> ,item_names tsvector NULL
> ,product__ids__tsquery tsquery NULL
> ,product__ids__tsvector tsvector NULL
> ,population_time TIMESTAMP NOT NULL DEFAULT clock_timestamp()
> ,PRIMARY KEY(id)
> )

> It seems the tsvector field did not contribute to this error as the
> error occurred when I attempted to populate the tsquery field with
> rather long tsquery data. Without populating the tsvector field but
> got the same error with the same size message indicating that the data
> in the tsvector fields do not lead to this problem.

Yeah, on poking into the system catalogs I see that tsquery is declared
as not supporting toasting (it has typstorage = 'p'lain). I don't
offhand know the implementation reason for that or whether it would be
a good idea to change it. But obviously Teodor's expectation was that
nobody would ever want to store large tsqueries on disk. I guess it
would be worth asking what's your use-case for storing tsquery, as
opposed to tsvector?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2010-11-18 15:45:29 Re: Whose bug is this?
Previous Message Tom Lane 2010-11-18 15:22:40 Re: Whose bug is this?