From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Pavel Borisov <pashkin.elfe@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18616: Long-running hash index build can not be interrupted
Date: Fri, 13 Sep 2024 15:45:11 -0400
Message-ID: <125359.1726256711@sss.pgh.pa.us> (raw)
In-Reply-To: <122464.1726255346@sss.pgh.pa.us>
References: <18616-acbb9e5caf41e964@postgresql.org>
<CALT9ZEF8uLBizGLFEQArNv1t6aoQnjKuo04yEQfyup9nodj6Bg@mail.gmail.com>
<20a57c76-7aaf-a641-add3-147541a4dccf@gmail.com>
<122464.1726255346@sss.pgh.pa.us>
I wrote:
> 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.
Oh, false alarm: that test in hashbuild takes basically the
min of maintenance_work_mem and NBuffers, so that with
default NBuffers of 128MB, there's no difference here between
those two settings.
The reason I see a difference in behavior seems to be that
with maintenance_work_mem = 1GB, the tuple sorting step
completes faster, allowing control to reach _h_indexbuild
before the 10sec timeout I was testing with. With the
smaller maintenance_work_mem setting, we're still sorting
when it times out --- and there are CHECK_FOR_INTERRUPTS
calls in the sort code.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, exclusion@gmail.com, pashkin.elfe@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18616: Long-running hash index build can not be interrupted
In-Reply-To: <125359.1726256711@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox