From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hannu Krosing <hannu(at)tm(dot)ee>, Hannu Krosing <hannu(at)krosing(dot)net>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, jwbaker(at)acm(dot)org |
Subject: | Re: LWLock contention: I think I understand the problem |
Date: | 2002-01-23 19:10:27 |
Message-ID: | 200201231910.g0NJARm29656@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-odbc |
Tom Lane wrote:
> Hannu Krosing <hannu(at)tm(dot)ee> writes:
> > Was it not the case that instead of locking whole tables the new
> > vacuum locks only one page at a time. If it can't lock that page it
> > just moves to next one instead of waiting for other backend to release
> > its lock.
>
> No, it just waits till it can get the page lock.
>
> The only conditional part of the new vacuum algorithm is truncation of
> the relation file (releasing empty end pages back to the OS). That
> requires exclusive lock on the relation, which it will not be able to
> get if there are any other users of the relation. In that case it
> forgets about truncation and just leaves the empty pages as free space.
If we have one page with data, and 100 empty pages, and another page
with data on the end, will VACUUM shrink that to two pages if no one is
accessing the table, or does it do _only_ intra-page moves.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Haroldo Stenger | 2002-01-23 19:15:12 | Re: Savepoints |
Previous Message | Tom Lane | 2002-01-23 19:00:00 | Re: Schemas vs. PostQUEL: resolving qualified identifiers |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-01-23 19:15:21 | Re: LWLock contention: I think I understand the problem |
Previous Message | Hiroshi Inoue | 2002-01-21 02:36:40 | Re: [ODBC] odbc error |