pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: cpro29a@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13327: Error on insert (gist index)
Date: Thu, 21 May 2015 07:14:48 +0000
Message-ID: <20150521071448.26511.8665@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      13327
Logged by:          Sergey Melekhin
Email address:      cpro29a@gmail.com
PostgreSQL version: 9.3.6
Operating system:   Ubuntu 14.04
Description:        

I stumbled upon error, when multiple inserts or updates on table with gist
index on many int[] columns fails.
I got "stack depth limit exceded" on update, but when I started to write
this test case I did not manage to get to updates - I got error when trying
to populate table:
ERROR:  failed to add item to index page in "test_gist_i"

CODE:

begin;

create table test_gist(id serial primary key, a1 int[],a2 int[], a3 int[],
a4 int[], a5 int[]);
create index test_gist_i on test_gist using gist (a1,a2,a3,a4,a5);

--Simple random array generator
create or replace function rnd_arr(p_len int) returns int[]
as $$
 select array_agg(val)
 from (select trunc(random()*1000.0)::int val
       from generate_series(1,trunc(random()*p_len*1.0)::int+1)
       ) v;
$$ language sql;


--##THIS FAILS:
insert into test_gist(a1,a2,a3,a4,a5)
select rnd_arr(10),rnd_arr(10),rnd_arr(10),rnd_arr(10),rnd_arr(10)
  from generate_series(1,100000);
;

--##WITH MESSAGE:
--ERROR:  failed to add item to index page in "test_gist_i"

rollback;



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)  latest in thread

Message-ID: <20150521071448.26511.8665@wrigleys.postgresql.org>
Permalink:  ../20150521071448.26511.8665@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20150521071448.26511.8665@wrigleys.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: cpro29a@gmail.com
  Subject: Re: BUG #13327: Error on insert (gist index)
  In-Reply-To: <20150521071448.26511.8665@wrigleys.postgresql.org>
  References: <20150521071448.26511.8665@wrigleys.postgresql.org>

* 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