pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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:22:26 -0400
Message-ID: <122464.1726255346@sss.pgh.pa.us> (raw)
In-Reply-To: <20a57c76-7aaf-a641-add3-147541a4dccf@gmail.com>
References: <18616-acbb9e5caf41e964@postgresql.org>
	<CALT9ZEF8uLBizGLFEQArNv1t6aoQnjKuo04yEQfyup9nodj6Bg@mail.gmail.com>
	<20a57c76-7aaf-a641-add3-147541a4dccf@gmail.com>

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





view thread (5+ messages)  latest in thread

Message-ID: <122464.1726255346@sss.pgh.pa.us>
Permalink:  ../122464.1726255346@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/122464.1726255346@sss.pgh.pa.us

 · 

reply

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: <122464.1726255346@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