Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2017-01-31 Thread Michael Paquier
On Wed, Jan 25, 2017 at 2:53 PM, Michael Paquier wrote: > The latest patch available still applies, one person has added his > name (John G) in October though there have been no reviews. There have > been a couple of arguments against this patch, and the thread has had

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2017-01-24 Thread Michael Paquier
On Mon, Dec 5, 2016 at 11:32 AM, Haribabu Kommi wrote: > > > On Tue, Nov 15, 2016 at 1:17 PM, Noah Misch wrote: >> >> On Mon, Nov 14, 2016 at 10:21:53AM -0800, Peter Geoghegan wrote: >> > BTW, I recently noticed that the latest version of Valgrind,

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-12-04 Thread Haribabu Kommi
On Tue, Nov 15, 2016 at 1:17 PM, Noah Misch wrote: > On Mon, Nov 14, 2016 at 10:21:53AM -0800, Peter Geoghegan wrote: > > BTW, I recently noticed that the latest version of Valgrind, 3.12, > > added this new feature: > > > > * Memcheck: > > > > - Added meta mempool support

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Noah Misch
On Mon, Nov 14, 2016 at 10:21:53AM -0800, Peter Geoghegan wrote: > BTW, I recently noticed that the latest version of Valgrind, 3.12, > added this new feature: > > * Memcheck: > > - Added meta mempool support for describing a custom allocator which: > - Auto-frees all chunks assuming that

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Peter Geoghegan
On Mon, Nov 14, 2016 at 10:17 AM, Andres Freund wrote: > I think so, yes. IIRC I discussed it with Noah and Peter G. at a > conference recently. We'd basically mark the content of shared buffers > inaccessible at backend startup, and mark it accessible whenever a > PinBuffer()

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Andres Freund
On 2016-11-14 13:12:28 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2016-11-14 12:32:53 -0500, Tom Lane wrote: > >> Basically my concern is that this restriction isn't documented anywhere > >> and I'm not entirely certain it's been adhered to everywhere. I'd feel >

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Tom Lane
Andres Freund writes: > On 2016-11-14 12:32:53 -0500, Tom Lane wrote: >> Basically my concern is that this restriction isn't documented anywhere >> and I'm not entirely certain it's been adhered to everywhere. I'd feel >> much better about it if there were some way we could

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Andres Freund
On 2016-11-14 12:32:53 -0500, Tom Lane wrote: > Heikki Linnakangas writes: > > On 11/14/2016 06:18 PM, Tom Lane wrote: > >> You're implicitly assuming that a scan always returns its results in the > >> same slot, and that no other slot could contain a copy of that data, but > >>

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Peter Geoghegan
On Mon, Nov 14, 2016 at 9:22 AM, Heikki Linnakangas wrote: > I think that difference in the API is exactly what caught Peter by surprise > and led to bug #14344. And I didn't see it either, until you two debugged > it. That is accurate, of course. -- Peter Geoghegan --

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Tom Lane
Heikki Linnakangas writes: > On 11/14/2016 06:18 PM, Tom Lane wrote: >> You're implicitly assuming that a scan always returns its results in the >> same slot, and that no other slot could contain a copy of that data, but >> there is no guarantee of either. See bug #14344 and

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Heikki Linnakangas
On 11/14/2016 06:18 PM, Tom Lane wrote: Robert Haas writes: On Mon, Nov 14, 2016 at 10:23 AM, Tom Lane wrote: I don't believe Andres' claim anyway. There are certainly cases where an allegedly-valid slot could be pointing at garbage, but table

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Robert Haas
On Mon, Nov 14, 2016 at 11:18 AM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Nov 14, 2016 at 10:23 AM, Tom Lane wrote: >>> I don't believe Andres' claim anyway. There are certainly cases where an >>> allegedly-valid slot

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 14, 2016 at 10:23 AM, Tom Lane wrote: >> I don't believe Andres' claim anyway. There are certainly cases where an >> allegedly-valid slot could be pointing at garbage, but table scans aren't >> one of them, precisely

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Robert Haas
On Mon, Nov 14, 2016 at 10:23 AM, Tom Lane wrote: > Robert Haas writes: >> On Sat, Nov 12, 2016 at 10:28 AM, Andres Freund wrote: >>> On 2016-08-30 07:38:10 -0400, Tom Lane wrote: I think this is probably wrong, or at least

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Andres Freund
On 2016-11-14 10:09:02 -0500, Robert Haas wrote: > On Sat, Nov 12, 2016 at 10:28 AM, Andres Freund wrote: > > On 2016-08-30 07:38:10 -0400, Tom Lane wrote: > >> Heikki Linnakangas writes: > >> > While profiling some queries and looking at executor overhead, I

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Tom Lane
Robert Haas writes: > On Sat, Nov 12, 2016 at 10:28 AM, Andres Freund wrote: >> On 2016-08-30 07:38:10 -0400, Tom Lane wrote: >>> I think this is probably wrong, or at least very dangerous to remove. >>> The reason for the feature is that the slot may

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-14 Thread Robert Haas
On Sat, Nov 12, 2016 at 10:28 AM, Andres Freund wrote: > On 2016-08-30 07:38:10 -0400, Tom Lane wrote: >> Heikki Linnakangas writes: >> > While profiling some queries and looking at executor overhead, I >> > realized that we're not making much use of

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-11-12 Thread Andres Freund
On 2016-08-30 07:38:10 -0400, Tom Lane wrote: > Heikki Linnakangas writes: > > While profiling some queries and looking at executor overhead, I > > realized that we're not making much use of TupleTableSlot's ability to > > hold a buffer pin. In a SeqScan, the buffer is held

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-10-02 Thread Michael Paquier
On Wed, Aug 31, 2016 at 6:03 AM, Andres Freund wrote: > On 2016-08-30 21:59:44 +0100, Greg Stark wrote: >> On Tue, Aug 30, 2016 at 11:12 AM, Heikki Linnakangas wrote: >> > While profiling some queries and looking at executor overhead, I realized >> > that

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-08-30 Thread Andres Freund
On 2016-08-30 21:59:44 +0100, Greg Stark wrote: > On Tue, Aug 30, 2016 at 11:12 AM, Heikki Linnakangas wrote: > > While profiling some queries and looking at executor overhead, I realized > > that we're not making much use of TupleTableSlot's ability to hold a buffer > > pin. In

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-08-30 Thread Greg Stark
On Tue, Aug 30, 2016 at 11:12 AM, Heikki Linnakangas wrote: > While profiling some queries and looking at executor overhead, I realized > that we're not making much use of TupleTableSlot's ability to hold a buffer > pin. In a SeqScan, the buffer is held pinned by the underlying

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-08-30 Thread Andres Freund
Hi, On 2016-08-30 13:12:41 +0300, Heikki Linnakangas wrote: > While profiling some queries and looking at executor overhead, I realized > that we're not making much use of TupleTableSlot's ability to hold a buffer > pin. FWIW, I came to a similar conclusion, while working on passing around

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-08-30 Thread Heikki Linnakangas
On 08/30/2016 02:38 PM, Tom Lane wrote: Heikki Linnakangas writes: While profiling some queries and looking at executor overhead, I realized that we're not making much use of TupleTableSlot's ability to hold a buffer pin. In a SeqScan, the buffer is held pinned by the

Re: [HACKERS] Pinning a buffer in TupleTableSlot is unnecessary

2016-08-30 Thread Tom Lane
Heikki Linnakangas writes: > While profiling some queries and looking at executor overhead, I > realized that we're not making much use of TupleTableSlot's ability to > hold a buffer pin. In a SeqScan, the buffer is held pinned by the > underlying heap-scan anyway. Same with