Re: Improve the concurency of vacuum full table and select statement on the same relation

From: Jinyu <call_jinyu(at)126(dot)com>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Jim Nasby" <Jim(dot)Nasby(at)bluetreble(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improve the concurency of vacuum full table and select statement on the same relation
Date: 2015-10-19 14:25:00
Message-ID: 673d253d.1504c.150807d3280.Coremail.call_jinyu@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The lock upgrade for vacuum full table tends to cause deadlock with other lock upgrade transaction which is from AccessShareLock to lockmode > AccessShareLock. Tom Lane's concern is that it will cause vacuum full failed after do a lot of work.
But If we can always let other transaction failed to break deadlock instead of vacuum full table, how about this lock upgrade solution?
For example: we can enlarge the 'DeadlockTimeout' for vacuum full table transaction to avoid deadlock check.

Jinyu Zhang
regards

At 2015-10-16 23:04:51, "Robert Haas" <robertmhaas(at)gmail(dot)com> wrote:
>On Thu, Oct 15, 2015 at 8:28 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
>> It's just how the authors of pg_repack decided to handle it. It seems pretty
>> reasonable, since you probably don't want an errant DDL statement to cause
>> the rollback of hours or days of pg_repack work.
>>
>> Ultimately, I don't think you'll find many people interested in working on
>> this, because the whole goal is to never need VACUUM FULL or pg_repack. If
>> you're clustering just for the sake of clustering, that has it's own set of
>> difficulties that should be addressed.
>
>I think the topic of online table reorganization is a pretty important
>one, actually. That is a need that we have had for a long time,
>creates serious operational problems for users, and it's also a need
>that is not going away. I think the chances of eliminating that need
>completely, even if we rearchitected or heap storage, are nil.
>
>I think the bigger issue is that it's a very hard problem to solve.
>pg_repack is one approach, but I've heard more than one person say
>that, as C-3PO said about the asteroid, it may not be entirely stable.
>
>--
>Robert Haas
>EnterpriseDB: http://www.enterprisedb.com
>The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-10-19 14:51:00 Re: pg_restore cancel TODO
Previous Message Craig Ringer 2015-10-19 13:43:32 Re: PATCH: 9.5 replication origins fix for logical decoding