Re: BUG #14941: Vacuum crashes
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: lyes.amd@gmail.com, pgsql-bugs@postgresql.org
Date: 2017-12-01T17:15:47Z
Lists: pgsql-bugs, pgsql-hackers
On 12/01/2017 05:09 PM, lyes.amd@gmail.com wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14941
> Logged by: Lyes Ameddah
> Email address: lyes.amd@gmail.com
> PostgreSQL version: 9.6.0
The current minor version in 9.6 branch is 9.6. You're missing a year
worth of bugfixes ...
> Operating system: CentOs 7
> Description:
>
> Hello,
>
> I make a complete empty once a week in an automated way and it happens that
> the vacuum is stuck on a table (perhaps another process has a lock first).
>
1) Completely empty what?
2) Do you mean autovacuum or manual vacuum?
3) Do you see waiting locks in pg_locks catalog while this is happening?
SELECT * FROM pg_locks WHERE NOT granted;
>
> The behavior I would like to see is that the void ignores this table and
> moves to another instead of being blocked.
>
I believe autovacuum should not block waiting for a heavy-weight lock on
a table since this commit that went into 9.1:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=32896c40ca766146312b28a5a0eb3f66ca0300ed
So I'm wondering what problem you're running into.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Add option SKIP_LOCKED to VACUUM and ANALYZE
- 803b1301e8c9 12.0 landed
-
Rename VACOPT_NOWAIT to VACOPT_SKIP_LOCKED
- edc6b41bd4a8 12.0 landed
-
Add parenthesized options syntax for ANALYZE.
- 854dd8cff523 11.0 landed
-
Don't allow VACUUM VERBOSE ANALYZE VERBOSE.
- 921059bd66c7 11.0 landed
-
Fix inadequate locking during get_rel_oids().
- 19de0ab23ccb 11.0 cited
-
Avoid having autovacuum workers wait for relation locks.
- 32896c40ca76 9.1.0 cited