GIN pending clean up is not interruptable

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: GIN pending clean up is not interruptable
Date: 2015-08-11 22:07:15
Message-ID: CAMkU=1wtAeZQCNtT6-b65y0gK=4FntYFssXmQ4=6DF_kZcj5ZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

When a user backend (as opposed to vacuum or autoanalyze) gets burdened
with cleaning up the GIN pending list, it does not
call CHECK_FOR_INTERRUPTS().

Since cleaning does a lot of random IO, it can take a long time and it is
not nice to be uninterruptable.

The attached patch adds an else branch to call CHECK_FOR_INTERRUPTS().

But I think we could instead just call vacuum_delay_point unconditionally.
It calls CHECK_FOR_INTERRUPTS(), and if not in a throttled vacuum it does
nothing else. (That is how ANALYZE handles it.)

This issue is in all branches.

Cheers,

Jeff

Attachment Content-Type Size
gin_freelist_interrupt.patch application/octet-stream 689 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-08-11 22:21:14 Re: Foreign join pushdown vs EvalPlanQual
Previous Message Gideon Dresdner 2015-08-11 21:38:26 can't coax query planner into using all columns of a gist index