Re: [PATCHES] pgstattuple locking fix

2007-10-22 Thread ITAGAKI Takahiro
Tom Lane [EMAIL PROTECTED] wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: Here is a trivial fix of locking issue in pgstattuple(). Hmm, is this really a bug, and if so how far back does it go? I'm thinking that having a pin on the buffer should be enough to call PageGetHeapFreeSpace.

Re: [PATCHES] pgstattuple locking fix

2007-10-22 Thread Heikki Linnakangas
ITAGAKI Takahiro wrote: Tom Lane [EMAIL PROTECTED] wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: Here is a trivial fix of locking issue in pgstattuple(). Hmm, is this really a bug, and if so how far back does it go? I'm thinking that having a pin on the buffer should be enough to call

Re: [PATCHES] pgstattuple locking fix

2007-10-22 Thread Heikki Linnakangas
Heikki Linnakangas wrote: ITAGAKI Takahiro wrote: Tom Lane [EMAIL PROTECTED] wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: Here is a trivial fix of locking issue in pgstattuple(). Hmm, is this really a bug, and if so how far back does it go? I'm thinking that having a pin on the buffer

Re: [PATCHES] pgstattuple locking fix

2007-10-22 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: ITAGAKI Takahiro wrote: Tom Lane [EMAIL PROTECTED] wrote: I'm thinking that having a pin on the buffer should be enough to call PageGetHeapFreeSpace. Hmm... we might use pd_upper and pd_lower at different times, No I think the original patch

Re: [PATCHES] pgstattuple locking fix

2007-10-22 Thread Tom Lane
Heikki Linnakangas [EMAIL PROTECTED] writes: On second thought, we do call PageGetHeapFreeSpace without holding a lock in heap_page_prune_opt as well, so it better be safe. Looking closer at PageGetHeapFreeSpace, I think it is. The return value can be bogus, of course. That's worth noting in

Re: [PATCHES] pgstattuple locking fix

2007-10-21 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: Here is a trivial fix of locking issue in pgstattuple(). Hmm, is this really a bug, and if so how far back does it go? I'm thinking that having a pin on the buffer should be enough to call PageGetHeapFreeSpace. regards, tom lane