pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ерохин Денис Владимирович <erohin-d@datagile.ru>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Fix receiving large legal tsvector from binary format
Date: Sun, 01 Oct 2023 13:24:01 -0400
Message-ID: <1842217.1696181041@sss.pgh.pa.us> (raw)
In-Reply-To: <009801d9f2d9$f29730c0$d7c59240$@datagile.ru>
References: <009801d9f2d9$f29730c0$d7c59240$@datagile.ru>

=?koi8-r?B?5dLPyMnOIOTFzsnTIPfMwcTJzcnSz9fJ3g==?= <erohin-d@datagile.ru> writes:
> There is a problem on receiving large tsvector from binary format with
> getting error "invalid tsvector: maximum total lexeme length exceeded".

Good catch!  Even without an actual failure, we'd be wasting space
on-disk anytime we stored a tsvector received through binary input.

I pushed your 0001 and 0002, but I don't really agree that 0003
is an improvement.  It looks to me like it'll result in one
repalloc per lexeme, instead of the O(log N) behavior we had before.
It's not that important to keep the palloc chunk size small here,
given that we don't allow tsvectors to get anywhere near 1Gb anyway.

			regards, tom lane





view thread (2+ messages)

Message-ID: <1842217.1696181041@sss.pgh.pa.us>
Permalink:  ../1842217.1696181041@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1842217.1696181041@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, erohin-d@datagile.ru
  Subject: Re: Fix receiving large legal tsvector from binary format
  In-Reply-To: <1842217.1696181041@sss.pgh.pa.us>

* 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