Re: sample scans and predicate locking

2019-05-19 Thread Thomas Munro
On Mon, May 20, 2019 at 10:23 AM Andres Freund wrote: > On 2019-05-19 13:57:42 +1200, Thomas Munro wrote: > > Yeah, we could probably predicate-lock pages in > > heapam_scan_sample_next_block() and tuples in > > heapam_scan_sample_next_tuple(), instead of doing this. Seems like a > > reasonable i

Re: sample scans and predicate locking

2019-05-19 Thread Andres Freund
Hi, On 2019-05-19 13:57:42 +1200, Thomas Munro wrote: > On Sun, May 19, 2019 at 8:31 AM Andres Freund wrote: > > While looking at fixing [1] on master, I noticed the following > > codeblock: > > > > static HeapScanDesc > > heap_beginscan_internal(Relation relation, Snapshot snapshot, > >

Re: sample scans and predicate locking

2019-05-18 Thread Thomas Munro
On Sun, May 19, 2019 at 8:31 AM Andres Freund wrote: > While looking at fixing [1] on master, I noticed the following > codeblock: > > static HeapScanDesc > heap_beginscan_internal(Relation relation, Snapshot snapshot, > int nkeys, ScanKey key, >

sample scans and predicate locking

2019-05-18 Thread Andres Freund
Hi, While looking at fixing [1] on master, I noticed the following codeblock: static HeapScanDesc heap_beginscan_internal(Relation relation, Snapshot snapshot, int nkeys, ScanKey key, ParallelHeapScanD