Re: [HACKERS] Vacuum analyze bug CAUGHT - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] Vacuum analyze bug CAUGHT
Date
Msg-id 37DD42C9.B360721B@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Vacuum analyze bug CAUGHT  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Vacuum analyze bug CAUGHT
List pgsql-hackers
Tom Lane wrote:
> 
> Also, rather than running around and adding locks to every single
> place that calls heap_open or heap_close, I wonder whether we shouldn't
> have heap_open/heap_close themselves automatically grab or release
> at least a minimal lock (AccessShareLock, I suppose).

This could result in deadlocks...

> Or maybe better: change heap_open/heap_openr/heap_close to take an
> additional parameter specifying the kind of lock to grab.  That'd still
> mean having to visit all the call sites, but it would force people to
> think about the issue in future rather than forgetting to lock a table
> they're accessing.

This way is better.

Vadim


pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Fixing Simms' vacuum problems
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Vacuum analyze bug CAUGHT