On Sat, Mar 23, 2013 at 6:45 PM, Xi Wang <xi.w...@gmail.com> wrote: > A side question: at src/backend/storage/lmgr/proc.c:1150, is there a > null pointer deference for `autovac'?
Not really. If the deadlock_state is DS_BLOCKED_BY_AUTOVACUUM, there has to be a blocking autovacuum proc. As in the other case that you found, though, some code rearrangement would likely make the intent of the code more clear and avoid future mistakes. Perhaps something like: if (deadlock_state == DS_BLOCKED_BY_AUTOVACUUM && allow_autovacuum_cancel && (autovac = GetBlockingAutoVacuumPgproc()) != NULL) { PGXACT *autovac_pgxact = &ProcGlobal->allPgXact[autovac->pgprocno]; ... -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers