Re: ADD COLUMN ts tsvector GENERATED too slow

Поиск
Список
Период
Сортировка
От Florents Tselai
Тема Re: ADD COLUMN ts tsvector GENERATED too slow
Дата
Msg-id 4ABCA676-9635-421E-83DC-609E87E967AC@gmail.com
обсуждение исходный текст
Ответ на Re: ADD COLUMN ts tsvector GENERATED too slow  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: ADD COLUMN ts tsvector GENERATED too slow  (Florents Tselai <florents.tselai@gmail.com>)
Список pgsql-general

> On 6 Jul 2022, at 12:38 PM, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>
> On 06.07.22 10:42, Florents Tselai wrote:
>> I have a beefy server (40+ worker processes , 40GB+ shared buffers) and a table holding (key text, text text,) of
around50M rows. 
>> These are text fields extracted from 4-5 page pdfs each.
>> I’m adding the following generated col to keep up with tsvectors
>> ALTER TABLE docs_text ADD COLUMN ts tsvector GENERATED ALWAYS AS (to_tsvector(’simple', left(text, 1048575))) STORED
>> I expect this to be slow, but it’s been running for 18hrs already and I certainly hope I’ve done something wrong and
there’sa smarter way. 
>
> Maybe it's stuck on a lock?  ALTER TABLE / ADD COLUMN requires an exclusive lock on the table.

Looking at pg_locks and pg_stat_activity doesn’t seem like it’s stuck behind something like ACCESS SHARE or similar.




В списке pgsql-general по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: lifetime of the old CTID
Следующее
От: Florents Tselai
Дата:
Сообщение: Re: ADD COLUMN ts tsvector GENERATED too slow