Re: GIN improvements part 1: additional information - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: GIN improvements part 1: additional information
Date
Msg-id 52DDD51E.2080408@fuzzy.cz
Whole thread Raw
In response to Re: GIN improvements part 1: additional information  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: GIN improvements part 1: additional information  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On 20.1.2014 19:30, Heikki Linnakangas wrote:
> 
> Attached is a yet another version, with more bugs fixed and more 
> comments added and updated. I would appreciate some heavy-testing of 
> this patch now. If you could re-run the tests you've been using,
> that could be great. I've tested the WAL replay by replicating GIN
> operations over streaming replication. That doesn't guarantee it's
> correct, but it's a good smoke test.

I gave it a try - the OOM error seems to be gone, but now get this
  PANIC:  cannot insert duplicate items to GIN index page

This only happens when building the index incrementally (i.e. using a
sequence of INSERT statements into a table with GIN index). When I
create a new index on a table (already containing the same dataset) it
works just fine.

Also, I tried to reproduce the issue by running a simple plpgsql loop
(instead of a complex python script):

DO LANGUAGE plpgsql $$
DECLARE   r tsvector;
BEGIN   FOR r IN SELECT body_tsvector FROM data_table LOOP       INSERT INTO idx_table (body_tsvector) VALUES (r);
ENDLOOP;
 
END$$;

where data_table is the table with imported data (the same data I
mentioned in the post about OOM errors), and index_table is an empty
table with a GIN index. And indeed it fails, but only if I run the block
in multiple sessions in parallel.

regards
Tomas



pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: inherit support for foreign tables
Next
From: Shigeru Hanada
Date:
Subject: Re: inherit support for foreign tables