Re: Questions/Observations related to Gist vacuum

2020-01-12 Thread Dilip Kumar
On Thu, Jan 9, 2020 at 4:41 PM Mahendra Singh Thalor wrote: > > On Mon, 9 Dec 2019 at 14:37, Amit Kapila wrote: > > > > On Mon, Dec 9, 2019 at 2:27 PM Amit Kapila wrote: > > > > > > I have modified the patch for the above points and additionally ran > > > pgindent. Let me know what you think

Re: Questions/Observations related to Gist vacuum

2020-01-09 Thread Mahendra Singh Thalor
On Mon, 9 Dec 2019 at 14:37, Amit Kapila wrote: > > On Mon, Dec 9, 2019 at 2:27 PM Amit Kapila wrote: > > > > I have modified the patch for the above points and additionally ran > > pgindent. Let me know what you think about the attached patch? > > > > A new version with a slightly modified

Re: Questions/Observations related to Gist vacuum

2019-12-09 Thread Dilip Kumar
On Mon, Dec 9, 2019 at 2:37 PM Amit Kapila wrote: > > On Mon, Dec 9, 2019 at 2:27 PM Amit Kapila wrote: > > > > I have modified the patch for the above points and additionally ran > > pgindent. Let me know what you think about the attached patch? > > > > A new version with a slightly modified

Re: Questions/Observations related to Gist vacuum

2019-12-09 Thread Amit Kapila
On Mon, Dec 9, 2019 at 2:27 PM Amit Kapila wrote: > > I have modified the patch for the above points and additionally ran > pgindent. Let me know what you think about the attached patch? > A new version with a slightly modified commit message. -- With Regards, Amit Kapila. EnterpriseDB:

Re: Questions/Observations related to Gist vacuum

2019-12-09 Thread Amit Kapila
On Fri, Oct 25, 2019 at 9:22 PM Masahiko Sawada wrote: > > On Wed, Oct 23, 2019 at 8:14 PM Amit Kapila wrote: > > > > On Tue, Oct 22, 2019 at 2:17 PM Dilip Kumar wrote: > > > > > > On Tue, Oct 22, 2019 at 10:53 AM Amit Kapila > > > wrote: > > > > > > I have modified as we discussed. Please

Re: Questions/Observations related to Gist vacuum

2019-10-25 Thread Masahiko Sawada
On Wed, Oct 23, 2019 at 8:14 PM Amit Kapila wrote: > > On Tue, Oct 22, 2019 at 2:17 PM Dilip Kumar wrote: > > > > On Tue, Oct 22, 2019 at 10:53 AM Amit Kapila > > wrote: > > > > > > > Basically, only IndexBulkDeleteResult is now shared across the stage > > > > so we can move all members to

Re: Questions/Observations related to Gist vacuum

2019-10-22 Thread Dilip Kumar
On Tue, Oct 22, 2019 at 10:53 AM Amit Kapila wrote: > > On Tue, Oct 22, 2019 at 10:50 AM Dilip Kumar wrote: > > > > On Tue, Oct 22, 2019 at 9:10 AM Amit Kapila wrote: > > > > > > On Fri, Oct 18, 2019 at 4:51 PM Dilip Kumar wrote: > > > > > > > > I have prepared a first version of the patch.

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Amit Kapila
On Tue, Oct 22, 2019 at 10:50 AM Dilip Kumar wrote: > > On Tue, Oct 22, 2019 at 9:10 AM Amit Kapila wrote: > > > > On Fri, Oct 18, 2019 at 4:51 PM Dilip Kumar wrote: > > > > > > I have prepared a first version of the patch. Currently, I am > > > performing an empty page deletion for all the

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Dilip Kumar
On Tue, Oct 22, 2019 at 9:10 AM Amit Kapila wrote: > > On Fri, Oct 18, 2019 at 4:51 PM Dilip Kumar wrote: > > > > I have prepared a first version of the patch. Currently, I am > > performing an empty page deletion for all the cases. > > > > Few comments: > -- > 1. > -/* > -

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Amit Kapila
On Fri, Oct 18, 2019 at 4:51 PM Dilip Kumar wrote: > > I have prepared a first version of the patch. Currently, I am > performing an empty page deletion for all the cases. > Few comments: -- 1. -/* - * State kept across vacuum stages. - */ typedef struct { -

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Dilip Kumar
On Mon, Oct 21, 2019 at 2:58 PM Andrey Borodin wrote: > > > > > 21 окт. 2019 г., в 11:12, Dilip Kumar написал(а): > > > > On Mon, Oct 21, 2019 at 2:30 PM Andrey Borodin wrote: > >> > >> I've took a look into the patch, and cannot understand one simple thing... > >> We should not call

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Andrey Borodin
> 21 окт. 2019 г., в 11:12, Dilip Kumar написал(а): > > On Mon, Oct 21, 2019 at 2:30 PM Andrey Borodin wrote: >> >> I've took a look into the patch, and cannot understand one simple thing... >> We should not call gistvacuum_delete_empty_pages() for same gist_stats twice. >> Another way once

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Dilip Kumar
On Mon, Oct 21, 2019 at 2:30 PM Andrey Borodin wrote: > > Hi! > > > 18 окт. 2019 г., в 13:21, Dilip Kumar написал(а): > > > > On Fri, Oct 18, 2019 at 10:55 AM Amit Kapila > > wrote: > >> > >> > >> I think we can do it in general as adding some check for parallel > >> vacuum there will look bit

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Andrey Borodin
Hi! > 18 окт. 2019 г., в 13:21, Dilip Kumar написал(а): > > On Fri, Oct 18, 2019 at 10:55 AM Amit Kapila wrote: >> >> >> I think we can do it in general as adding some check for parallel >> vacuum there will look bit hackish. > I agree with that point. > It is not clear if we get enough >>

Re: Questions/Observations related to Gist vacuum

2019-10-21 Thread Dilip Kumar
On Mon, Oct 21, 2019 at 11:23 AM Amit Kapila wrote: > > On Fri, Oct 18, 2019 at 10:48 AM Amit Kapila wrote: > > > > Thanks for the test. It shows that prior to patch the memory was > > getting leaked in TopTransactionContext during multi-pass vacuum and > > after patch, there is no leak. I

Re: Questions/Observations related to Gist vacuum

2019-10-20 Thread Amit Kapila
On Fri, Oct 18, 2019 at 10:48 AM Amit Kapila wrote: > > Thanks for the test. It shows that prior to patch the memory was > getting leaked in TopTransactionContext during multi-pass vacuum and > after patch, there is no leak. I will commit the patch early next > week unless Heikki or someone

Re: Questions/Observations related to Gist vacuum

2019-10-18 Thread Dilip Kumar
On Fri, Oct 18, 2019 at 10:55 AM Amit Kapila wrote: > > On Fri, Oct 18, 2019 at 9:41 AM Dilip Kumar wrote: > > > > On Wed, Oct 16, 2019 at 7:22 PM Heikki Linnakangas wrote: > > > > > > On 16 October 2019 12:57:03 CEST, Amit Kapila > > > wrote: > > > >On Tue, Oct 15, 2019 at 7:13 PM Heikki

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Amit Kapila
On Fri, Oct 18, 2019 at 9:41 AM Dilip Kumar wrote: > > On Wed, Oct 16, 2019 at 7:22 PM Heikki Linnakangas wrote: > > > > On 16 October 2019 12:57:03 CEST, Amit Kapila > > wrote: > > >On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas > > >wrote: > > >> All things > > >> considered, I'm not

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Amit Kapila
On Fri, Oct 18, 2019 at 9:34 AM Dilip Kumar wrote: > > On Thu, Oct 17, 2019 at 6:32 PM Dilip Kumar wrote: > > > > On Thu, 17 Oct 2019, 14:59 Amit Kapila, wrote: > >> > >> On Thu, Oct 17, 2019 at 1:47 PM Dilip Kumar wrote: > >> > > >> > On Thu, Oct 17, 2019 at 12:27 PM Heikki Linnakangas > >>

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Dilip Kumar
On Wed, Oct 16, 2019 at 7:22 PM Heikki Linnakangas wrote: > > On 16 October 2019 12:57:03 CEST, Amit Kapila wrote: > >On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas > >wrote: > >> All things > >> considered, I'm not sure which is better. > > > >Yeah, this is a tough call to make, but if we

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Dilip Kumar
On Thu, Oct 17, 2019 at 6:32 PM Dilip Kumar wrote: > > On Thu, 17 Oct 2019, 14:59 Amit Kapila, wrote: >> >> On Thu, Oct 17, 2019 at 1:47 PM Dilip Kumar wrote: >> > >> > On Thu, Oct 17, 2019 at 12:27 PM Heikki Linnakangas >> > wrote: >> > > >> > > On 17/10/2019 05:31, Amit Kapila wrote: >> > >

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Dilip Kumar
On Thu, 17 Oct 2019, 14:59 Amit Kapila, wrote: > On Thu, Oct 17, 2019 at 1:47 PM Dilip Kumar wrote: > > > > On Thu, Oct 17, 2019 at 12:27 PM Heikki Linnakangas > wrote: > > > > > > On 17/10/2019 05:31, Amit Kapila wrote: > > > > > > > > The patch looks good to me. I have slightly modified the

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Amit Kapila
On Thu, Oct 17, 2019 at 1:47 PM Dilip Kumar wrote: > > On Thu, Oct 17, 2019 at 12:27 PM Heikki Linnakangas wrote: > > > > On 17/10/2019 05:31, Amit Kapila wrote: > > > > > > The patch looks good to me. I have slightly modified the comments and > > > removed unnecessary initialization. > > > > >

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Dilip Kumar
On Thu, Oct 17, 2019 at 12:27 PM Heikki Linnakangas wrote: > > On 17/10/2019 05:31, Amit Kapila wrote: > > On Wed, Oct 16, 2019 at 11:20 AM Dilip Kumar wrote: > >> > >> On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas wrote: > >>> > >>> On 15/10/2019 09:37, Amit Kapila wrote: > While

Re: Questions/Observations related to Gist vacuum

2019-10-17 Thread Heikki Linnakangas
On 17/10/2019 05:31, Amit Kapila wrote: On Wed, Oct 16, 2019 at 11:20 AM Dilip Kumar wrote: On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas wrote: On 15/10/2019 09:37, Amit Kapila wrote: While reviewing a parallel vacuum patch [1], we noticed a few things about $SUBJECT implemented in

Re: Questions/Observations related to Gist vacuum

2019-10-16 Thread Dilip Kumar
On Thu, Oct 17, 2019 at 9:15 AM Amit Kapila wrote: > > On Wed, Oct 16, 2019 at 7:21 PM Heikki Linnakangas wrote: > > > > On 16 October 2019 12:57:03 CEST, Amit Kapila > > wrote: > > >On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas > > >wrote: > > >> All things > > >> considered, I'm not

Re: Questions/Observations related to Gist vacuum

2019-10-16 Thread Amit Kapila
On Wed, Oct 16, 2019 at 7:21 PM Heikki Linnakangas wrote: > > On 16 October 2019 12:57:03 CEST, Amit Kapila wrote: > >On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas > >wrote: > >> All things > >> considered, I'm not sure which is better. > > > >Yeah, this is a tough call to make, but if we

Re: Questions/Observations related to Gist vacuum

2019-10-16 Thread Amit Kapila
On Wed, Oct 16, 2019 at 11:20 AM Dilip Kumar wrote: > > On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas wrote: > > > > On 15/10/2019 09:37, Amit Kapila wrote: > > > While reviewing a parallel vacuum patch [1], we noticed a few things > > > about $SUBJECT implemented in commit - > > >

Re: Questions/Observations related to Gist vacuum

2019-10-16 Thread Heikki Linnakangas
On 16 October 2019 12:57:03 CEST, Amit Kapila wrote: >On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas >wrote: >> All things >> considered, I'm not sure which is better. > >Yeah, this is a tough call to make, but if we can allow it to delete >the pages in bulkdelete conditionally for parallel

Re: Questions/Observations related to Gist vacuum

2019-10-16 Thread Amit Kapila
On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas wrote: > > On 15/10/2019 09:37, Amit Kapila wrote: > > 2. Right now, in gistbulkdelete we make a note of empty leaf pages and > > internals pages and then in the second pass during gistvacuumcleanup, > > we delete all the empty leaf pages. I was

Re: Questions/Observations related to Gist vacuum

2019-10-15 Thread Dilip Kumar
On Tue, Oct 15, 2019 at 7:13 PM Heikki Linnakangas wrote: > > On 15/10/2019 09:37, Amit Kapila wrote: > > While reviewing a parallel vacuum patch [1], we noticed a few things > > about $SUBJECT implemented in commit - > > 7df159a620b760e289f1795b13542ed1b3e13b87. > > > > 1. A new memory context

Re: Questions/Observations related to Gist vacuum

2019-10-15 Thread Heikki Linnakangas
On 15/10/2019 09:37, Amit Kapila wrote: While reviewing a parallel vacuum patch [1], we noticed a few things about $SUBJECT implemented in commit - 7df159a620b760e289f1795b13542ed1b3e13b87. 1. A new memory context GistBulkDeleteResult->page_set_context has been introduced, but it doesn't seem