Re: BUG #18616: Long-running hash index build can not be interrupted
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2024-09-13T19:22:26Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Allow _h_indexbuild() to be interrupted.
- fae55f0bb385 18.0 landed
- 418c6a2c72d2 17.0 landed
- e0857898b87b 15.9 landed
- d23109f4bd65 16.5 landed
- b49013f2e86a 14.14 landed
- b27215dbb42b 13.17 landed
- 813ade54806c 12.21 landed
Alexander Lakhin <exclusion@gmail.com> writes: > 13.09.2024 17:51, Pavel Borisov wrote: >> I was unable to reproduce it on my machine with these settings. Tried statement timeouts 30-120s. Index build appears >> to be in interruptible phase on my system. > Yes, the patch works for me. The query is interrupted as expected. > But I wonder, why don't you the see same? I see the same result as Alexander: the query fails to time out after the expected 90 seconds, and it's looping in _h_indexbuild. Looking at hashbuild, the effective sort_threshold depends on NBuffers, so maybe if you have that set to a high enough value it fails to go into the sort path? If I use SET maintenance_work_mem = '128MB'; instead of the suggested 1GB, I don't see the problem. regards, tom lane