strange error sequence on parallel btree creation

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: strange error sequence on parallel btree creation
Date: 2019-01-30 10:26:06
Message-ID: 201901301026.c2xchy7v2x67@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

While trying out the progress report mechanism for btrees, I noticed
this strange chain of errors:

2019-01-29 15:51:55.928 -03 [43789] ERROR: no se pudo crear el índice único «a_generate_series_idx»
2019-01-29 15:51:55.928 -03 [43789] DETALLE: La llave (generate_series)=(152) está duplicada.
2019-01-29 15:51:55.928 -03 [43789] SENTENCIA: create unique index concurrently on a (generate_series);
2019-01-29 15:51:55.928 -03 [44634] ERROR: no se pudo crear el índice único «a_generate_series_idx»
2019-01-29 15:51:55.928 -03 [44634] DETALLE: La llave (generate_series)=(31339) está duplicada.
2019-01-29 15:51:55.928 -03 [44634] SENTENCIA: create unique index concurrently on a (generate_series);
2019-01-29 15:51:55.985 -03 [43670] LOG: background worker "parallel worker" (PID 44634) terminó con código de salida 1

Note that those come from the same create index: the one on process
46299 must evidently be a parallel worker. It's weird that two
processes report the index building error. But even if it were correct,
the CONTEXT line in the other process is not okay ... precisely because
it's the parent.

What I did was

create table a as select * from generate_series(1, 1000000);
insert into a select * from generate_series(1, 80000000);
create index on a (generate_series);

The last command used the laptop disk, excessive use of which cause the whole
thing to stall for a few dozen seconds (I think it's because of the encryption
but I'm not sure). I then changed lc_messages to C, for pasting here, and
repeated with an external USB drive -- result: it fails cleanly (only one
ERROR).

--
Álvaro Herrera

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2019-01-30 11:10:41 Re: Problems with plan estimates in postgres_fdw
Previous Message John Naylor 2019-01-30 09:56:32 Re: WIP: Avoid creation of the free space map for small tables