Re: Reducing relation locking overhead - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reducing relation locking overhead
Date
Msg-id 4828.1133668272@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reducing relation locking overhead  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> What if we change to cost-based removal, i.e., remove the one whose cost is 
> smaller. In this case, an two-days-to-be-done reindex should never get 
> killed.

Instead, it would kill all useful work in your system :-(.  An old
transaction would be the one invincible gunslinger in town, mowing
down every transaction that dared to go up against it, and getting
older and even less vincible with every win.  Yet this would still
not give it any guarantee of ever being able to commit, as long as
there's a constant stream of competition.

Certainly it's interesting to think about a smarter deadlock-escape
algorithm, but that's no solution compared to not getting into a
deadlock in the first place.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] snprintf() argument reordering not working under
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] snprintf() argument reordering not working under