Re: Bug in VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL
Date: 2016-09-06 14:17:53
Message-ID: CANP8+jLizgEka7_y3Wj+jf6fU-HW1SS2YehiSthtJ54Z8M-V=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6 September 2016 at 11:30, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> In vacuumlazy.c, VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL is described as
> being in ms on line 85, yet it is used on line 1759 in a call to
> pg_usleep, so is treated as microseconds rather than milliseconds.
>
> As a result, the timeout during lazy_truncate_heap() is actually only
> 5ms long, not 5s long.
>
> So this looks to me like a bug, patch attached, for back-patching to 9.1
> vacuum_lock_wait_ms.v1,patch
>
> Objections?

I'm inclined to backpatch this for 9.6 only, unless I hear more.

For earlier releases this will suddenly make VACUUMs take 5 secs where
they used to take 50ms, which could be a big surprise for some people
running database wide VACUUMs.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Chalke 2016-09-06 14:22:22 Re: PassDownLimitBound for ForeignScan/CustomScan
Previous Message David Steele 2016-09-06 14:11:51 Re: Proposal for changes to recovery.conf API