From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Gavin M(dot) Roy" <gmr(at)myyearbook(dot)com> |
Cc: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 8.3.0 Core with concurrent vacuum fulls |
Date: | 2008-03-05 16:16:15 |
Message-ID: | 27483.1204733775@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Gavin M. Roy" <gmr(at)myyearbook(dot)com> writes:
> 2008-03-04 05:45:20 EST [6742]: [7-1] PANIC: deadlock detected
> 2008-03-04 05:45:20 EST [6742]: [8-1] DETAIL: Process 6742 waits for
> AccessShareLock on relation 2619 of database 16385; blocked by process 6740.
> Process 6740 waits for AccessShareLock on relation 1247 of database 16385;
> blocked by process 6742.
> 2008-03-04 05:45:20 EST [6742]: [9-1] STATEMENT: VACUUM FULL
> pg_catalog.pg_type
Hmm ...
regression=# select 2619::regclass, 1247::regclass;
regclass | regclass
--------------+----------
pg_statistic | pg_type
(1 row)
regression=#
So presumably 6740 is doing a vac full on pg_statistic. There isn't
really any need for these to conflict in cache initialization.
It strikes me that we could fix most of the deadlock risk if we just
switched the order of the two tests in the loop in
PrepareToInvalidateCacheTuple; that is, don't force initialization
of a catcache unless it's one we need to access right now. Then a
VAC FULL is only going to be interested in initializing caches for
the catalog it's vacuuming, which should be safe enough.
We still need to deal with the excessive PANIC risk, but I think we
have a plan for that now.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-03-05 17:04:30 | Re: Patch to update libpqxx's homepage in README |
Previous Message | Tom Lane | 2008-03-05 15:59:42 | Re: 8.3.0 Core with concurrent vacuum fulls |