Re: Failure to create GiST on ltree column - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Failure to create GiST on ltree column
Date
Msg-id 20200524225248.GS4472@telsasoft.com
Whole thread Raw
In response to Failure to create GiST on ltree column  (Victor Yegorov <vyegorov@gmail.com>)
Responses Re: Failure to create GiST on ltree column
List pgsql-hackers
On Sun, May 24, 2020 at 09:30:15PM +0300, Victor Yegorov wrote:
> Greetings.
> 
> I am getting random failures in `CREATE INDEX USING gist` over ltree column
> while performing pg_restore.
> I get either
>     ERROR:  stack depth limit exceeded
> or
>     ERROR:  failed to add item to index page
> 
> Thing is — if I retry index creation manually, I get it successfully built
> in ~50% of the cases.
> 
> I would like to find out what's the real cause here, but I am not sure how
> to do it.
> If anybody could provide some guidance, I am open to investigate this case.
> 
> I'm on PostgreSQL 11.8 (Debian 11.8-1.pgdg90+1), debugging symbols
> installed.

I think you'd want to attach a debugger to the backend's PID and set breakpoint
on errfinish() or pg_re_throw() and reproduce the problem to get a stacktrace
(separate stacks for both errors).
https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD

What is value of maintenance_work_mem ?

What's the definition of the index and relevant table columns ?

Do you know if that was that an issue under 11.7 as well ?

Are you running on any interesting hardware ?

-- 
Justin



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: WAL reader APIs and WAL segment open/close callbacks
Next
From: Atsushi Torikoshi
Date:
Subject: Re: Is it useful to record whether plans are generic or custom?