Re: heapam_index_build_range_scan's anyvisible

2019-11-08 Thread Michael Paquier
On Fri, Nov 08, 2019 at 12:10:35PM -0800, Andres Freund wrote: > And pushed. Sorry that this took so long. Thanks Andres. I have updated the status of the patch in the CF app accordingly: https://commitfest.postgresql.org/25/2235/. -- Michael signature.asc Description: PGP signature

Re: heapam_index_build_range_scan's anyvisible

2019-11-08 Thread Andres Freund
On 2019-11-08 01:22:45 -0800, Andres Freund wrote: > On 2019-11-07 09:25:40 -0800, Andres Freund wrote: > > On 2019-11-07 17:02:36 +0900, Michael Paquier wrote: > > > On Wed, Sep 25, 2019 at 10:24:05PM -0700, Ashwin Agrawal wrote: > > > > Thanks for reporting, I did indeed missed out contrib. Pleas

Re: heapam_index_build_range_scan's anyvisible

2019-11-08 Thread Andres Freund
Hi, On 2019-11-07 09:25:40 -0800, Andres Freund wrote: > On 2019-11-07 17:02:36 +0900, Michael Paquier wrote: > > On Wed, Sep 25, 2019 at 10:24:05PM -0700, Ashwin Agrawal wrote: > > > Thanks for reporting, I did indeed missed out contrib. Please find > > > attached > > > the v2 of the patch which

Re: heapam_index_build_range_scan's anyvisible

2019-11-07 Thread Michael Paquier
On Thu, Nov 07, 2019 at 09:25:40AM -0800, Andres Freund wrote: > Let me take a look this afternoon. Swapped out of my brain right now > unfortunately. Thanks for the update. -- Michael signature.asc Description: PGP signature

Re: heapam_index_build_range_scan's anyvisible

2019-11-07 Thread Andres Freund
Hi, On 2019-11-07 17:02:36 +0900, Michael Paquier wrote: > On Wed, Sep 25, 2019 at 10:24:05PM -0700, Ashwin Agrawal wrote: > > Thanks for reporting, I did indeed missed out contrib. Please find attached > > the v2 of the patch which includes the change required in contrib as well. > > Okay, that

Re: heapam_index_build_range_scan's anyvisible

2019-11-07 Thread Michael Paquier
On Wed, Sep 25, 2019 at 10:24:05PM -0700, Ashwin Agrawal wrote: > Thanks for reporting, I did indeed missed out contrib. Please find attached > the v2 of the patch which includes the change required in contrib as well. Okay, that makes sense. The patch looks good to me so I have switched it to re

Re: heapam_index_build_range_scan's anyvisible

2019-09-25 Thread Ashwin Agrawal
On Wed, Sep 25, 2019 at 1:52 PM Alvaro Herrera wrote: > Sounds OK ... except that Travis points out that Ashwin forgot to patch > contrib: > > make[4]: Entering directory > '/home/travis/build/postgresql-cfbot/postgresql/contrib/amcheck' > gcc -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclar

Re: heapam_index_build_range_scan's anyvisible

2019-09-25 Thread Alvaro Herrera
On 2019-Jul-30, Ashwin Agrawal wrote: > On Tue, Jul 16, 2019 at 10:22 AM Andres Freund wrote: > > Looks good to me. Planning to apply this unless somebody wants to argue > > against it soon? > > Andres, I didn't yet register this for next commitfest. If its going in > soon anyways will not do i

Re: heapam_index_build_range_scan's anyvisible

2019-07-30 Thread Ashwin Agrawal
On Tue, Jul 16, 2019 at 10:22 AM Andres Freund wrote: > Hi, > > On 2019-07-11 17:27:46 -0700, Ashwin Agrawal wrote: > > Please find attached the patch to remove IndexBuildCallback's dependency > on > > HeapTuple, as discussed. Changed to have the argument as ItemPointer > > instead of HeapTuple.

Re: heapam_index_build_range_scan's anyvisible

2019-07-16 Thread Andres Freund
Hi, On 2019-07-11 17:27:46 -0700, Ashwin Agrawal wrote: > Please find attached the patch to remove IndexBuildCallback's dependency on > HeapTuple, as discussed. Changed to have the argument as ItemPointer > instead of HeapTuple. Other larger refactoring if feasible for > index_build_range_scan API

Re: heapam_index_build_range_scan's anyvisible

2019-07-11 Thread Ashwin Agrawal
On Mon, Jun 10, 2019 at 5:38 PM Ashwin Agrawal wrote: > > On Mon, Jun 10, 2019 at 2:56 PM Andres Freund wrote: > >> > Currently, all AM needs to build HeapTuple in >> > index_build_range_scan function. I looked into all the callback >> functions >> > and only htup->t_self is used from heaptuple

Re: heapam_index_build_range_scan's anyvisible

2019-06-10 Thread Ashwin Agrawal
On Mon, Jun 10, 2019 at 2:56 PM Andres Freund wrote: > > Currently, all AM needs to build HeapTuple in > > index_build_range_scan function. I looked into all the callback functions > > and only htup->t_self is used from heaptuple in all the functions > (unless I > > missed something). So, if seem

Re: heapam_index_build_range_scan's anyvisible

2019-06-10 Thread Andres Freund
Hi, On 2019-06-10 13:48:54 -0700, Ashwin Agrawal wrote: > While at it might be helpful and better to also decouple HeapTuple > dependency for IndexBuildCallback. Indeed. > Currently, all AM needs to build HeapTuple in > index_build_range_scan function. I looked into all the callback functions >

Re: heapam_index_build_range_scan's anyvisible

2019-06-10 Thread Ashwin Agrawal
On Fri, Jun 7, 2019 at 1:19 PM Robert Haas wrote: > I spent some time today studying heapam_index_build_range_scan and > quickly reached the conclusion that it's kind of a mess. > While at it might be helpful and better to also decouple HeapTuple dependency for IndexBuildCallback. Currently, all

Re: heapam_index_build_range_scan's anyvisible

2019-06-07 Thread Alvaro Herrera
On 2019-Jun-07, Robert Haas wrote: > Yeah, I wondered whether SnapshotNonVacuumable might've been added > later, but I was too lazy to check the commit log. I'll try coding up > that approach and see how it looks. Thanks. > But do you have any comment on the question of whether this function >

Re: heapam_index_build_range_scan's anyvisible

2019-06-07 Thread Robert Haas
On Fri, Jun 7, 2019 at 4:30 PM Alvaro Herrera wrote: > On 2019-Jun-07, Robert Haas wrote: > > I spent some time today studying heapam_index_build_range_scan and > > quickly reached the conclusion that it's kind of a mess. At heart > > it's pretty simple: loop over all the table, check each tuple

Re: heapam_index_build_range_scan's anyvisible

2019-06-07 Thread Alvaro Herrera
On 2019-Jun-07, Robert Haas wrote: > I spent some time today studying heapam_index_build_range_scan and > quickly reached the conclusion that it's kind of a mess. At heart > it's pretty simple: loop over all the table, check each tuple against > any qual, and pass the visible ones to the callback

heapam_index_build_range_scan's anyvisible

2019-06-07 Thread Robert Haas
I spent some time today studying heapam_index_build_range_scan and quickly reached the conclusion that it's kind of a mess. At heart it's pretty simple: loop over all the table, check each tuple against any qual, and pass the visible ones to the callback. However, in an attempt to make it cater t