Re: [PATCH] avoid buffer underflow in errfinish()
От | Robert Haas |
---|---|
Тема | Re: [PATCH] avoid buffer underflow in errfinish() |
Дата | |
Msg-id | CA+TgmoYjHVXgC77u8H=jxSd3cGCV+RUH1x=QDb0dGC=ovDOZqA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] avoid buffer underflow in errfinish() (Xi Wang <xi.wang@gmail.com>) |
Ответы |
Re: [PATCH] avoid buffer underflow in errfinish()
|
Список | pgsql-hackers |
On Sat, Mar 23, 2013 at 6:45 PM, Xi Wang <xi.wang@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
В списке pgsql-hackers по дате отправления: