RE: BUG #15460: Error while creating index or constraint

Paul van der Linden <paul.vanderlinden@mapcreator.eu>

From: Paul van der Linden <paul.vanderlinden@mapcreator.eu>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2018-10-29T13:01:15Z
Lists: pgsql-bugs
Well I also saw it on uuids and possibly enum.
One of the tables is a materialized view with 550161114 records consisting of 2 uuid-colums and 2 enum columns.
Total size is 34 GB...

-----Original Message-----
From: Peter Geoghegan <pg@bowt.ie> 
Sent: maandag 29 oktober 2018 13:53
To: Paul van der Linden <paul.vanderlinden@mapcreator.eu>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>; Heikki Linnakangas <hlinnaka@iki.fi>
Subject: Re: BUG #15460: Error while creating index or constraint

On Mon, Oct 29, 2018 at 12:45 PM Paul van der Linden <paul.vanderlinden@mapcreator.eu> wrote:
> It happens with both unique and non-unique index.
> When I disable virusscanner I also get the error, but settin g the 
> max_parallel_workers to 0 does let me create the index

Thanks for trying that out. This confirms that parallel CREATE INDEX is involved.

Is it possible for you to provide me with a dump of the data, or a minimal test case? You can provided it to me off-list if that's easier, possibly using Google drive or something. I realize that the amount of data involved here isn't trivial, so this may be difficult.

I'm a little suspicious of the fact that your table is probably aligned to certain boundaries, since it consists only of integers/bigints. Maybe that's just a coincidence, though.

Thanks
--
Peter Geoghegan

Commits

  1. Have BufFileSize() ereport() on FileSize() failure.

  2. Use 64 bit type for BufFileSize().

  3. Adjust trace_sort log messages.

  4. Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions.