pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <JanWieck@Yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Browne <cbbrowne@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
Date: Mon, 28 Mar 2011 19:55:57 -0400
Message-ID: <4D91200D.4020005@Yahoo.com> (raw)
In-Reply-To: <28594.1301342493@sss.pgh.pa.us>
References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org>
	<4345.1301066239@sss.pgh.pa.us>
	<AANLkTimiCkmZ5NL=iPUG08TRAd-OJp_M1sR2SCm6c2BL@mail.gmail.com>
	<13556.1301069421@sss.pgh.pa.us>
	<1301080686-sup-7539@alvh.no-ip.org>
	<15329.1301082238@sss.pgh.pa.us>
	<AANLkTimuzhLR64DiNJq8QcMpgKBBmuW6eiErqZCVp+jk@mail.gmail.com>
	<16028.1301086103@sss.pgh.pa.us>
	<AANLkTinoRiEg3Nb=PXLD+c9ehNwh63XLtDJ+q9VbA5==@mail.gmail.com>
	<18898.1301286552@sss.pgh.pa.us>
	<AANLkTinvJgdKC=-ScG-DTELSQu4etYVwr=+NGkvyhKKo@mail.gmail.com>
	<AANLkTik8E4b5QuuAwvTgiZJBpR2KcTxPrVtx=gqvB7NN@mail.gmail.com>
	<28594.1301342493@sss.pgh.pa.us>

On 3/28/2011 4:01 PM, Tom Lane wrote:
> Christopher Browne<cbbrowne@gmail.com>  writes:
>>  - Grab timestamp
>>  - Grab exclusive lock
>>  - Process [Some number of pages]
>>  - Check time.
>>  - If [# of ms] have passed then check to see if anyone else has a lock
>>  O/S on the table.
>>    - Commit&  give up the lock for a bit if they do
>>    - Go back and process more pages if they don't
>
> Actually, we could simplify that even further.  Keep the code exactly
> as-is, but every small-number-of-pages, check to see if someone is
> waiting on a conflicting lock, and if so, fall out of the page checking
> loop.  Truncate away however many pages we know at that time are safe,
> and end the vacuum normally.
>
> We'd have to rejigger the stuff in the lock manager that tries to boot
> autovacuum off the lock forcibly, but with a bit of luck that would get
> less crocky not more so.

I somehow fail to see how this complete reversal of who does what and 
affecting code in entirely different parts of the system will qualify 
for patching back releases.


Jan

-- 
Anyone who trades liberty for security deserves neither
liberty nor security. -- Benjamin Franklin



view thread (30+ messages)  latest in thread

Message-ID: <4D91200D.4020005@Yahoo.com>
Permalink:  ../4D91200D.4020005@Yahoo.com/
Also on:    postgresql.org/message-id/4D91200D.4020005@Yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: JanWieck@Yahoo.com, tgl@sss.pgh.pa.us, cbbrowne@gmail.com, robertmhaas@gmail.com
  Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full)
  In-Reply-To: <4D91200D.4020005@Yahoo.com>
  References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org> <4345.1301066239@sss.pgh.pa.us> <AANLkTimiCkmZ5NL=iPUG08TRAd-OJp_M1sR2SCm6c2BL@mail.gmail.com> <13556.1301069421@sss.pgh.pa.us> <1301080686-sup-7539@alvh.no-ip.org> <15329.1301082238@sss.pgh.pa.us> <AANLkTimuzhLR64DiNJq8QcMpgKBBmuW6eiErqZCVp+jk@mail.gmail.com> <16028.1301086103@sss.pgh.pa.us> <AANLkTinoRiEg3Nb=PXLD+c9ehNwh63XLtDJ+q9VbA5==@mail.gmail.com> <18898.1301286552@sss.pgh.pa.us> <AANLkTinvJgdKC=-ScG-DTELSQu4etYVwr=+NGkvyhKKo@mail.gmail.com> <AANLkTik8E4b5QuuAwvTgiZJBpR2KcTxPrVtx=gqvB7NN@mail.gmail.com> <28594.1301342493@sss.pgh.pa.us> <4D91200D.4020005@Yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox