Skip site navigation (1) Skip section navigation (2)

Re: Allowing VACUUM to time out when waiting for locks?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Allowing VACUUM to time out when waiting for locks?
Date: 2005-01-30 06:58:40
Message-ID: 215.1107068320@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> Am I correct in saying that the FSM now tracks the entire table, and that 
> the FSM parameters just determine how much is stored in memory?

No.  Any free space that can't be remembered in FSM is lost to use.
(Not completely --- an update of a row on the same page can reuse it ---
but for the most part you want to make FSM large enough to remember all
the useful free space.)

> Is any type of opportunistic locking likely/planned for a future version 
> (ie. a has lock, b asks for conflicting lock, c asks for lock that is OK 
> with a but denied by b; so c's lock is allowed and b stays waiting).

That's deliberately disallowed by the current logic because of the risk
of starving b indefinitely.  IIRC it would be a trivial code change to
do the other, but I doubt it's a good idea.  The typical situation is
exactly a VACUUM that wants an exclusive lock, versus a fairly
continuous stream of shared lock requests for select/insert/update/delete.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-01-30 07:04:30
Subject: Re: Huge memory consumption during vacuum (v.8.0)
Previous:From: Oleg BartunovDate: 2005-01-30 06:58:19
Subject: Re: Huge memory consumption during vacuum (v.8.0)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group