Re: BUG #15460: Error while creating index or constraint
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, paul.vanderlinden@mapcreator.eu, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Heikki Linnakangas <hlinnaka@iki.fi>
Date: 2018-11-29T00:01:13Z
Lists: pgsql-bugs
Attachments
- 0001-Detach-from-DSM-segments-last-in-resowner.c.patch (application/octet-stream) patch 0001
On Thu, Nov 29, 2018 at 11:48 AM Peter Geoghegan <pg@bowt.ie> wrote: > On Wed, Nov 28, 2018 at 1:04 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > LGTM. > > Pushed. Thanks. Thanks. So, of the three issues that came up in this thread, we have: 1. off_t overflow: fixed in aa551830. 2. Error reporting could be better: fixed in 1a990b20. 3. Windows can't unlink directories containing files that have been unlinked but are still open. This generates a WARNING and a left-behind empty directory when an error is raised. Here's a draft patch for #3. I can't test it on Windows myself; we'd need to confirm it by hacking code somewhere to raise errors while either running a parallel CREATE INDEX or a batched parallel hash join, perhaps something involving a low probability divide-by-zero, or maybe someone could try reverting commit aa551830 and using the short repro I gave in my previous message upthread. Assuming this can be confirmed to solve the problem, the real question is: is it a bad idea to back-patch code that changes the order of resowner release in this way? Specifically, could someone be upset if we start calling their DSM detach hook after we've released everything else, where previously it was before most other stuff? (Do any extensions use DSM segments, and specifically dsm_detach() hooks?) -- Thomas Munro http://www.enterprisedb.com
Commits
-
Have BufFileSize() ereport() on FileSize() failure.
- 1a990b207b86 12.0 landed
- 95c45718126f 11.2 landed
-
Use 64 bit type for BufFileSize().
- fa2ceaca4358 11.2 landed
- aa5518304213 12.0 landed
-
Adjust trace_sort log messages.
- cb6f8a9a7243 12.0 landed
- 886319d71bd5 11.1 landed
-
Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions.
- 445e31bdc749 11.0 cited