Re: [HACKERS] Block level parallel vacuum

2020-01-29 Thread Amit Kapila
On Wed, Jan 29, 2020 at 7:20 PM Masahiko Sawada wrote: > > > > > Okay, thanks for the review. Attached is an updated patch. I have > > additionally run pgindent. I am planning to commit the attached > > tomorrow unless I see more comments. > > Thank you for committing it! > I have marked this

Re: [HACKERS] Block level parallel vacuum

2020-01-29 Thread Masahiko Sawada
On Tue, 28 Jan 2020 at 18:47, Amit Kapila wrote: > > On Tue, Jan 28, 2020 at 12:53 PM Mahendra Singh Thalor > wrote: > > > > > > > > 1. > > > > > > -P, --parallel=PARALLEL_DEGREE do parallel vacuum > > > > > > > > > > > > I think, "do parallel vacuum" should be modified. Without > > > > > >

Re: [HACKERS] Block level parallel vacuum

2020-01-28 Thread Amit Kapila
On Tue, Jan 28, 2020 at 8:56 AM Masahiko Sawada wrote: > > On Sat, 25 Jan 2020 at 15:41, Amit Kapila wrote: > > > > > > I have made few modifications in the patch. > > > > 1. I think we should try to block the usage of 'full' and 'parallel' > > option in the utility rather than allowing the

Re: [HACKERS] Block level parallel vacuum

2020-01-28 Thread Amit Kapila
On Tue, Jan 28, 2020 at 12:53 PM Mahendra Singh Thalor wrote: > > > > > > 1. > > > > > -P, --parallel=PARALLEL_DEGREE do parallel vacuum > > > > > > > > > > I think, "do parallel vacuum" should be modified. Without specifying > > > > > -P, we are still doing parallel vacuum so we can use like

Re: [HACKERS] Block level parallel vacuum

2020-01-27 Thread Mahendra Singh Thalor
On Tue, 28 Jan 2020 at 12:32, Amit Kapila wrote: > > On Tue, Jan 28, 2020 at 12:04 PM Mahendra Singh Thalor > wrote: > > > > On Tue, 28 Jan 2020 at 08:14, Amit Kapila wrote: > > > > > > On Tue, Jan 28, 2020 at 2:13 AM Mahendra Singh Thalor > > > wrote: > > > > > > > > On Sat, 25 Jan 2020 at

Re: [HACKERS] Block level parallel vacuum

2020-01-27 Thread Amit Kapila
On Tue, Jan 28, 2020 at 12:04 PM Mahendra Singh Thalor wrote: > > On Tue, 28 Jan 2020 at 08:14, Amit Kapila wrote: > > > > On Tue, Jan 28, 2020 at 2:13 AM Mahendra Singh Thalor > > wrote: > > > > > > On Sat, 25 Jan 2020 at 12:11, Amit Kapila wrote: > > > > > > > > On Fri, Jan 24, 2020 at 4:58

Re: [HACKERS] Block level parallel vacuum

2020-01-27 Thread Mahendra Singh Thalor
On Tue, 28 Jan 2020 at 08:14, Amit Kapila wrote: > > On Tue, Jan 28, 2020 at 2:13 AM Mahendra Singh Thalor > wrote: > > > > On Sat, 25 Jan 2020 at 12:11, Amit Kapila wrote: > > > > > > On Fri, Jan 24, 2020 at 4:58 PM Mahendra Singh Thalor > > > wrote: > > > > > > > > On Thu, 23 Jan 2020 at

Re: [HACKERS] Block level parallel vacuum

2020-01-27 Thread Masahiko Sawada
On Sat, 25 Jan 2020 at 15:41, Amit Kapila wrote: > > On Fri, Jan 24, 2020 at 4:58 PM Mahendra Singh Thalor > wrote: > > > > On Thu, 23 Jan 2020 at 15:32, Mahendra Singh Thalor > > wrote: > > > > > > On Wed, 22 Jan 2020 at 12:48, Masahiko Sawada > > > wrote: > > > > > > > > Attached the

Re: [HACKERS] Block level parallel vacuum

2020-01-27 Thread Amit Kapila
On Tue, Jan 28, 2020 at 2:13 AM Mahendra Singh Thalor wrote: > > On Sat, 25 Jan 2020 at 12:11, Amit Kapila wrote: > > > > On Fri, Jan 24, 2020 at 4:58 PM Mahendra Singh Thalor > > wrote: > > > > > > On Thu, 23 Jan 2020 at 15:32, Mahendra Singh Thalor > > > wrote: > > > > > > > > On Wed, 22

Re: [HACKERS] Block level parallel vacuum

2020-01-27 Thread Mahendra Singh Thalor
On Sat, 25 Jan 2020 at 12:11, Amit Kapila wrote: > > On Fri, Jan 24, 2020 at 4:58 PM Mahendra Singh Thalor > wrote: > > > > On Thu, 23 Jan 2020 at 15:32, Mahendra Singh Thalor wrote: > > > > > > On Wed, 22 Jan 2020 at 12:48, Masahiko Sawada > > > wrote: > > > > > > > > Attached the updated

Re: [HACKERS] Block level parallel vacuum

2020-01-24 Thread Amit Kapila
On Fri, Jan 24, 2020 at 4:58 PM Mahendra Singh Thalor wrote: > > On Thu, 23 Jan 2020 at 15:32, Mahendra Singh Thalor > wrote: > > > > On Wed, 22 Jan 2020 at 12:48, Masahiko Sawada > > wrote: > > > > > > Attached the updated version patch. > > > > Thanks Sawada-san for the re-based patch. > > >

Re: [HACKERS] Block level parallel vacuum

2020-01-24 Thread Mahendra Singh Thalor
On Thu, 23 Jan 2020 at 15:32, Mahendra Singh Thalor wrote: > > On Wed, 22 Jan 2020 at 12:48, Masahiko Sawada > wrote: > > > > On Wed, 22 Jan 2020 at 11:23, Amit Kapila wrote: > > > > > > On Wed, Jan 22, 2020 at 7:14 AM Masahiko Sawada > > > wrote: > > > > > > > > Thank you for updating the

Re: [HACKERS] Block level parallel vacuum

2020-01-23 Thread Mahendra Singh Thalor
On Wed, 22 Jan 2020 at 12:48, Masahiko Sawada wrote: > > On Wed, 22 Jan 2020 at 11:23, Amit Kapila wrote: > > > > On Wed, Jan 22, 2020 at 7:14 AM Masahiko Sawada > > wrote: > > > > > > Thank you for updating the patch. Yeah MAXDEADTUPLES is better than > > > what I did in the previous version

Re: [HACKERS] Block level parallel vacuum

2020-01-21 Thread Masahiko Sawada
On Wed, 22 Jan 2020 at 11:23, Amit Kapila wrote: > > On Wed, Jan 22, 2020 at 7:14 AM Masahiko Sawada > wrote: > > > > Thank you for updating the patch. Yeah MAXDEADTUPLES is better than > > what I did in the previous version patch. > > > > Would you like to resubmit your vacuumdb utility patch

Re: [HACKERS] Block level parallel vacuum

2020-01-21 Thread Amit Kapila
On Wed, Jan 22, 2020 at 7:14 AM Masahiko Sawada wrote: > > Thank you for updating the patch. Yeah MAXDEADTUPLES is better than > what I did in the previous version patch. > Would you like to resubmit your vacuumdb utility patch for this enhancement? I see some old version of it and it seems to

Re: [HACKERS] Block level parallel vacuum

2020-01-21 Thread Amit Kapila
On Wed, Jan 22, 2020 at 7:14 AM Masahiko Sawada wrote: > > On Tue, 21 Jan 2020 at 18:16, Amit Kapila wrote: > > > > > > I have reproduced the issue by defining MaxAllocSize as 1024 and > > then during debugging, skipped the check related to LAZY_ALLOC_TUPLES. > > After patch, it fixes the

Re: [HACKERS] Block level parallel vacuum

2020-01-21 Thread Masahiko Sawada
On Tue, 21 Jan 2020 at 18:16, Amit Kapila wrote: > > On Tue, Jan 21, 2020 at 12:51 PM Masahiko Sawada > wrote: > > > > On Tue, 21 Jan 2020 at 16:13, Amit Kapila wrote: > > > > > > SizeOfLVDeadTuplesHeader is not defined by patch. Do you think it > > > makes sense to add a comment here about

Re: [HACKERS] Block level parallel vacuum

2020-01-21 Thread Dilip Kumar
On Tue, Jan 21, 2020 at 2:46 PM Amit Kapila wrote: > > On Tue, Jan 21, 2020 at 12:51 PM Masahiko Sawada > wrote: > > > > On Tue, 21 Jan 2020 at 16:13, Amit Kapila wrote: > > > > > > SizeOfLVDeadTuplesHeader is not defined by patch. Do you think it > > > makes sense to add a comment here about

Re: [HACKERS] Block level parallel vacuum

2020-01-21 Thread Amit Kapila
On Tue, Jan 21, 2020 at 12:51 PM Masahiko Sawada wrote: > > On Tue, 21 Jan 2020 at 16:13, Amit Kapila wrote: > > > > SizeOfLVDeadTuplesHeader is not defined by patch. Do you think it > > makes sense to add a comment here about the calculation? > > Oops, it should be SizeOfLVDeadTuples. Attached

Re: [HACKERS] Block level parallel vacuum

2020-01-20 Thread Masahiko Sawada
On Tue, 21 Jan 2020 at 16:13, Amit Kapila wrote: > > On Tue, Jan 21, 2020 at 12:11 PM Masahiko Sawada > wrote: > > > > On Tue, 21 Jan 2020 at 15:35, Amit Kapila wrote: > > > > > > On Tue, Jan 21, 2020 at 11:30 AM Andres Freund wrote: > > > > > > > > Hi, > > > > > > > > On 2020-01-20 09:09:35

Re: [HACKERS] Block level parallel vacuum

2020-01-20 Thread Amit Kapila
On Tue, Jan 21, 2020 at 12:11 PM Masahiko Sawada wrote: > > On Tue, 21 Jan 2020 at 15:35, Amit Kapila wrote: > > > > On Tue, Jan 21, 2020 at 11:30 AM Andres Freund wrote: > > > > > > Hi, > > > > > > On 2020-01-20 09:09:35 +0530, Amit Kapila wrote: > > > > Pushed, after fixing these two

Re: [HACKERS] Block level parallel vacuum

2020-01-20 Thread Masahiko Sawada
On Tue, 21 Jan 2020 at 15:35, Amit Kapila wrote: > > On Tue, Jan 21, 2020 at 11:30 AM Andres Freund wrote: > > > > Hi, > > > > On 2020-01-20 09:09:35 +0530, Amit Kapila wrote: > > > Pushed, after fixing these two comments. > > > > When attempting to vacuum a large table I just got: > > > >

Re: [HACKERS] Block level parallel vacuum

2020-01-20 Thread Amit Kapila
On Tue, Jan 21, 2020 at 11:30 AM Andres Freund wrote: > > Hi, > > On 2020-01-20 09:09:35 +0530, Amit Kapila wrote: > > Pushed, after fixing these two comments. > > When attempting to vacuum a large table I just got: > > postgres=# vacuum FREEZE ; > ERROR: invalid memory alloc request size

Re: [HACKERS] Block level parallel vacuum

2020-01-20 Thread Andres Freund
Hi, On 2020-01-20 09:09:35 +0530, Amit Kapila wrote: > Pushed, after fixing these two comments. When attempting to vacuum a large table I just got: postgres=# vacuum FREEZE ; ERROR: invalid memory alloc request size 1073741828 #0 palloc (size=1073741828) at

Re: [HACKERS] Block level parallel vacuum

2020-01-19 Thread Masahiko Sawada
On Mon, 20 Jan 2020 at 12:39, Amit Kapila wrote: > > On Fri, Jan 17, 2020 at 4:35 PM Mahendra Singh Thalor > wrote: > > > > Below are some review comments for v50 patch. > > > > 1. > > +LVShared > > +LVSharedIndStats > > +LVParallelState > > LWLock > > > > I think, LVParallelState should come

Re: [HACKERS] Block level parallel vacuum

2020-01-19 Thread Amit Kapila
On Fri, Jan 17, 2020 at 4:35 PM Mahendra Singh Thalor wrote: > > Below are some review comments for v50 patch. > > 1. > +LVShared > +LVSharedIndStats > +LVParallelState > LWLock > > I think, LVParallelState should come before LVSharedIndStats. > > 2. > +/* > + * It is possible that

Re: [HACKERS] Block level parallel vacuum

2020-01-19 Thread Amit Kapila
On Sun, Jan 19, 2020 at 2:15 AM Peter Geoghegan wrote: > > On Fri, Jan 17, 2020 at 1:18 AM Amit Kapila wrote: > > Thanks for doing this test again. In the attached patch, I have > > addressed all the comments and modified a few comments. > > I am in favor of the general idea of parallel VACUUM

Re: [HACKERS] Block level parallel vacuum

2020-01-18 Thread Peter Geoghegan
On Fri, Jan 17, 2020 at 1:18 AM Amit Kapila wrote: > Thanks for doing this test again. In the attached patch, I have > addressed all the comments and modified a few comments. I am in favor of the general idea of parallel VACUUM that parallelizes the processing of each index (I haven't looked at

Re: [HACKERS] Block level parallel vacuum

2020-01-17 Thread Mahendra Singh Thalor
On Fri, 17 Jan 2020 at 14:47, Amit Kapila wrote: > > On Fri, Jan 17, 2020 at 12:51 PM Dilip Kumar wrote: > > > > On Fri, Jan 17, 2020 at 11:39 AM Dilip Kumar wrote: > > I have performed cost delay testing on the latest test(I have used > > same script as attahced in [1] and [2]. > >

Re: [HACKERS] Block level parallel vacuum

2020-01-17 Thread Amit Kapila
On Fri, Jan 17, 2020 at 12:51 PM Dilip Kumar wrote: > > On Fri, Jan 17, 2020 at 11:39 AM Dilip Kumar wrote: > I have performed cost delay testing on the latest test(I have used > same script as attahced in [1] and [2]. > vacuum_cost_delay = 10 > vacuum_cost_limit = 2000 > > Observation: As we

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Dilip Kumar
On Fri, Jan 17, 2020 at 11:39 AM Dilip Kumar wrote: I have performed cost delay testing on the latest test(I have used same script as attahced in [1] and [2]. vacuum_cost_delay = 10 vacuum_cost_limit = 2000 Observation: As we have concluded earlier, the delay time is in sync with the I/O

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Dilip Kumar
On Fri, Jan 17, 2020 at 11:34 AM Amit Kapila wrote: > > On Fri, Jan 17, 2020 at 11:00 AM Dilip Kumar wrote: > > > > On Fri, Jan 17, 2020 at 10:44 AM Amit Kapila > > wrote: > > > > > > On Fri, Jan 17, 2020 at 9:36 AM Dilip Kumar wrote: > > > > > > > > I have few small comments. > > > > > > > >

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Amit Kapila
On Fri, Jan 17, 2020 at 11:00 AM Dilip Kumar wrote: > > On Fri, Jan 17, 2020 at 10:44 AM Amit Kapila wrote: > > > > On Fri, Jan 17, 2020 at 9:36 AM Dilip Kumar wrote: > > > > > > I have few small comments. > > > > > > 1. > > > logical streaming for large in-progress transactions+ > > > + /*

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Dilip Kumar
On Fri, Jan 17, 2020 at 10:44 AM Amit Kapila wrote: > > On Fri, Jan 17, 2020 at 9:36 AM Dilip Kumar wrote: > > > > I have few small comments. > > > > 1. > > logical streaming for large in-progress transactions+ > > + /* Can't perform vacuum in parallel */ > > + if (parallel_workers <= 0) > > + {

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Amit Kapila
On Fri, Jan 17, 2020 at 9:36 AM Dilip Kumar wrote: > > I have few small comments. > > 1. > logical streaming for large in-progress transactions+ > + /* Can't perform vacuum in parallel */ > + if (parallel_workers <= 0) > + { > + pfree(can_parallel_vacuum); > + return lps; > + } > > why are we

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Dilip Kumar
On Fri, Jan 17, 2020 at 9:36 AM Dilip Kumar wrote: > > On Thu, Jan 16, 2020 at 5:34 PM Amit Kapila wrote: > > > > On Thu, Jan 16, 2020 at 4:46 PM Masahiko Sawada > > wrote: > > > > > > Right. Most indexes (all?) of tables that are used in the regression > > > tests are smaller than

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Dilip Kumar
On Thu, Jan 16, 2020 at 5:34 PM Amit Kapila wrote: > > On Thu, Jan 16, 2020 at 4:46 PM Masahiko Sawada > wrote: > > > > Right. Most indexes (all?) of tables that are used in the regression > > tests are smaller than min_parallel_index_scan_size. And we set > > min_parallel_index_scan_size to 0

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Prabhat Sahu
Hi all, I would like to share my observation on this PG feature "Block-level parallel vacuum". I have tested the earlier patch (i.e v48) with below high-level test scenarios, and those are working as expected. - I have played around with these GUC parameters while testing

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Amit Kapila
On Thu, Jan 16, 2020 at 4:46 PM Masahiko Sawada wrote: > > Right. Most indexes (all?) of tables that are used in the regression > tests are smaller than min_parallel_index_scan_size. And we set > min_parallel_index_scan_size to 0 in vacuum.sql but VACUUM would not > be speeded-up much because of

Re: [HACKERS] Block level parallel vacuum

2020-01-16 Thread Masahiko Sawada
On Thu, 16 Jan 2020 at 14:11, Amit Kapila wrote: > > On Thu, Jan 16, 2020 at 10:11 AM Mahendra Singh Thalor > wrote: > > > > On Thu, 16 Jan 2020 at 08:22, Amit Kapila wrote: > > > > > > > 2. > > > > I checked time taken by vacuum.sql test. Execution time is almost same > > > > with and without

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Amit Kapila
On Thu, Jan 16, 2020 at 10:11 AM Mahendra Singh Thalor wrote: > > On Thu, 16 Jan 2020 at 08:22, Amit Kapila wrote: > > > > > 2. > > > I checked time taken by vacuum.sql test. Execution time is almost same > > > with and without v45 patch. > > > > > > Without v45 patch: > > > Run1) vacuum

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Thu, 16 Jan 2020 at 08:22, Amit Kapila wrote: > > On Thu, Jan 16, 2020 at 1:02 AM Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Jan 2020 at 19:31, Mahendra Singh Thalor > > wrote: > > > > > > On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor > > > wrote: > > > > > > > > > > > > I

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Amit Kapila
On Thu, Jan 16, 2020 at 1:02 AM Mahendra Singh Thalor wrote: > > On Wed, 15 Jan 2020 at 19:31, Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor > > wrote: > > > > > > > > > I reviewed v48 patch and below are some comments. > > > > > > 1. > > > +*

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Wed, 15 Jan 2020 at 19:31, Mahendra Singh Thalor wrote: > > On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor > wrote: > > > > On Wed, 15 Jan 2020 at 17:27, Amit Kapila wrote: > > > > > > On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada > > > wrote: > > > > > > > > Thank you for updating

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Wed, 15 Jan 2020 at 19:04, Mahendra Singh Thalor wrote: > > On Wed, 15 Jan 2020 at 17:27, Amit Kapila wrote: > > > > On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada > > wrote: > > > > > > Thank you for updating the patch! I have a few small comments. > > > > > > > I have adapted all your

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Mahendra Singh Thalor
On Wed, 15 Jan 2020 at 17:27, Amit Kapila wrote: > > On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada > wrote: > > > > Thank you for updating the patch! I have a few small comments. > > > > I have adapted all your changes, fixed the comment by Mahendra related > to initializing parallel state

Re: [HACKERS] Block level parallel vacuum

2020-01-15 Thread Amit Kapila
On Wed, Jan 15, 2020 at 10:05 AM Masahiko Sawada wrote: > > Thank you for updating the patch! I have a few small comments. > I have adapted all your changes, fixed the comment by Mahendra related to initializing parallel state only when there are at least two indexes. Additionally, I have

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Masahiko Sawada
On Wed, 15 Jan 2020 at 12:34, Mahendra Singh Thalor wrote: > > On Tue, 14 Jan 2020 at 17:16, Mahendra Singh Thalor > wrote: > > > > On Tue, 14 Jan 2020 at 16:17, Mahendra Singh Thalor > > wrote: > > > > > > On Tue, 14 Jan 2020 at 10:06, Masahiko Sawada > > > wrote: > > > > > > > > On Tue, 14

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Masahiko Sawada
On Tue, 14 Jan 2020 at 21:43, Amit Kapila wrote: > > On Tue, Jan 14, 2020 at 10:04 AM Masahiko Sawada > wrote: > > > > On Mon, 13 Jan 2020 at 12:50, Amit Kapila wrote: > > > > > > On Sat, Jan 11, 2020 at 7:48 PM Masahiko Sawada > > > wrote: > > > > > > Okay, would it better if we get rid of

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Mahendra Singh Thalor
On Tue, 14 Jan 2020 at 17:16, Mahendra Singh Thalor wrote: > > On Tue, 14 Jan 2020 at 16:17, Mahendra Singh Thalor > wrote: > > > > On Tue, 14 Jan 2020 at 10:06, Masahiko Sawada > > wrote: > > > > > > On Tue, 14 Jan 2020 at 03:20, Mahendra Singh Thalor > > > wrote: > > > > > > > > On Fri, 10

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Amit Kapila
On Tue, Jan 14, 2020 at 4:17 PM Mahendra Singh Thalor wrote: > > Hi, > > +/* > + * Try to initialize the parallel vacuum if requested > + */ > +if (params->nworkers >= 0 && vacrelstats->useindex) > +{ > +/* > + * Since parallel workers cannot access data in

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Amit Kapila
On Tue, Jan 14, 2020 at 10:04 AM Masahiko Sawada wrote: > > On Mon, 13 Jan 2020 at 12:50, Amit Kapila wrote: > > > > On Sat, Jan 11, 2020 at 7:48 PM Masahiko Sawada > > wrote: > > > > Okay, would it better if we get rid of this variable and have code like > > below? > > > > /* Skip the indexes

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Mahendra Singh Thalor
On Tue, 14 Jan 2020 at 16:17, Mahendra Singh Thalor wrote: > > On Tue, 14 Jan 2020 at 10:06, Masahiko Sawada > wrote: > > > > On Tue, 14 Jan 2020 at 03:20, Mahendra Singh Thalor wrote: > > > > > > On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > > > > > > > Hi > > > > Thank you for

Re: [HACKERS] Block level parallel vacuum

2020-01-14 Thread Mahendra Singh Thalor
On Tue, 14 Jan 2020 at 10:06, Masahiko Sawada wrote: > > On Tue, 14 Jan 2020 at 03:20, Mahendra Singh Thalor > wrote: > > > > On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > > > > > Hi > > > Thank you for update! I looked again > > > > > > (vacuum_indexes_leader) > > > +

Re: [HACKERS] Block level parallel vacuum

2020-01-13 Thread Masahiko Sawada
On Tue, 14 Jan 2020 at 03:20, Mahendra Singh Thalor wrote: > > On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > > > Hi > > Thank you for update! I looked again > > > > (vacuum_indexes_leader) > > + /* Skip the indexes that can be processed by parallel > > workers */ > > +

Re: [HACKERS] Block level parallel vacuum

2020-01-13 Thread Masahiko Sawada
On Mon, 13 Jan 2020 at 12:50, Amit Kapila wrote: > > On Sat, Jan 11, 2020 at 7:48 PM Masahiko Sawada > wrote: > > > > On Sat, 11 Jan 2020 at 13:18, Amit Kapila wrote: > > > > > > On Sat, Jan 11, 2020 at 9:23 AM Masahiko Sawada > > > wrote: > > > > > > > > On Fri, 10 Jan 2020 at 20:54, Mahendra

Re: [HACKERS] Block level parallel vacuum

2020-01-13 Thread Mahendra Singh Thalor
On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > Hi > Thank you for update! I looked again > > (vacuum_indexes_leader) > + /* Skip the indexes that can be processed by parallel workers > */ > + if (!skip_index) > + continue; > > Does the

Re: [HACKERS] Block level parallel vacuum

2020-01-13 Thread Amit Kapila
On Thu, Jan 9, 2020 at 4:03 PM Amit Kapila wrote: > > On Thu, Jan 9, 2020 at 10:41 AM Masahiko Sawada > wrote: > > > > On Wed, 8 Jan 2020 at 22:16, Amit Kapila wrote: > > > > > > > > > What do you think of the attached? Sawada-san, kindly verify the > > > changes and let me know your opinion.

Re: [HACKERS] Block level parallel vacuum

2020-01-13 Thread Sergei Kornilov
Hello > I just thought they were concerned > that the variable name skip_index might be confusing because we skip > if skip_index is NOT true. Right. >> > - bool skip_index = (get_indstats(lps->lvshared, i) == NULL || >> > - skip_parallel_vacuum_index(Irel[i], lps->lvshared)); >> > + bool

Re: [HACKERS] Block level parallel vacuum

2020-01-12 Thread Dilip Kumar
On Mon, Jan 13, 2020 at 9:20 AM Amit Kapila wrote: > > On Sat, Jan 11, 2020 at 7:48 PM Masahiko Sawada > wrote: > > > > On Sat, 11 Jan 2020 at 13:18, Amit Kapila wrote: > > > > > > On Sat, Jan 11, 2020 at 9:23 AM Masahiko Sawada > > > wrote: > > > > > > > > On Fri, 10 Jan 2020 at 20:54,

Re: [HACKERS] Block level parallel vacuum

2020-01-12 Thread Amit Kapila
On Sat, Jan 11, 2020 at 7:48 PM Masahiko Sawada wrote: > > On Sat, 11 Jan 2020 at 13:18, Amit Kapila wrote: > > > > On Sat, Jan 11, 2020 at 9:23 AM Masahiko Sawada > > wrote: > > > > > > On Fri, 10 Jan 2020 at 20:54, Mahendra Singh Thalor > > > wrote: > > > > > > > > On Fri, 10 Jan 2020 at

Re: [HACKERS] Block level parallel vacuum

2020-01-11 Thread Mahendra Singh Thalor
On Sat, 11 Jan 2020 at 19:48, Masahiko Sawada < masahiko.saw...@2ndquadrant.com> wrote: > > On Sat, 11 Jan 2020 at 13:18, Amit Kapila wrote: > > > > On Sat, Jan 11, 2020 at 9:23 AM Masahiko Sawada > > wrote: > > > > > > On Fri, 10 Jan 2020 at 20:54, Mahendra Singh Thalor < mahi6...@gmail.com>

Re: [HACKERS] Block level parallel vacuum

2020-01-11 Thread Masahiko Sawada
On Sat, 11 Jan 2020 at 13:18, Amit Kapila wrote: > > On Sat, Jan 11, 2020 at 9:23 AM Masahiko Sawada > wrote: > > > > On Fri, 10 Jan 2020 at 20:54, Mahendra Singh Thalor > > wrote: > > > > > > On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > > > > > > > Hi > > > > Thank you for

Re: [HACKERS] Block level parallel vacuum

2020-01-10 Thread Masahiko Sawada
On Fri, 10 Jan 2020 at 20:54, Mahendra Singh Thalor wrote: > > On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > > > Hi > > Thank you for update! I looked again > > > > (vacuum_indexes_leader) > > + /* Skip the indexes that can be processed by parallel workers */ > > +

Re: [HACKERS] Block level parallel vacuum

2020-01-10 Thread Sergei Kornilov
Hello > Yes, we should improve this. I tried to fix this. Attaching a delta > patch that is fixing both the comments. Thank you, I have no objections. I think that status of CF entry is outdated and the most appropriate status for this patch is "Ready to Commiter". Changed. I also added an

Re: [HACKERS] Block level parallel vacuum

2020-01-10 Thread Mahendra Singh Thalor
On Fri, 10 Jan 2020 at 15:51, Sergei Kornilov wrote: > > Hi > Thank you for update! I looked again > > (vacuum_indexes_leader) > + /* Skip the indexes that can be processed by parallel workers > */ > + if (!skip_index) > + continue; > > Does the

Re: [HACKERS] Block level parallel vacuum

2020-01-10 Thread Sergei Kornilov
Hi Thank you for update! I looked again (vacuum_indexes_leader) + /* Skip the indexes that can be processed by parallel workers */ + if (!skip_index) + continue; Does the variable name skip_index not confuse here? Maybe rename to something like

Re: [HACKERS] Block level parallel vacuum

2020-01-09 Thread Masahiko Sawada
On Thu, 9 Jan 2020 at 19:33, Amit Kapila wrote: > > On Thu, Jan 9, 2020 at 10:41 AM Masahiko Sawada > wrote: > > > > On Wed, 8 Jan 2020 at 22:16, Amit Kapila wrote: > > > > > > > > > What do you think of the attached? Sawada-san, kindly verify the > > > changes and let me know your opinion. >

Re: [HACKERS] Block level parallel vacuum

2020-01-09 Thread Mahendra Singh Thalor
On Thu, 9 Jan 2020 at 17:31, Sergei Kornilov wrote: > > Hello > > I noticed that parallel vacuum uses min_parallel_index_scan_size GUC to skip > small indexes but this is not mentioned in documentation for both vacuum > command and GUC itself. > > + /* Determine the number of parallel

Re: [HACKERS] Block level parallel vacuum

2020-01-09 Thread Sergei Kornilov
Hello I noticed that parallel vacuum uses min_parallel_index_scan_size GUC to skip small indexes but this is not mentioned in documentation for both vacuum command and GUC itself. + /* Determine the number of parallel workers to launch */ + if (lps->lvshared->for_cleanup) + {

Re: [HACKERS] Block level parallel vacuum

2020-01-08 Thread Masahiko Sawada
On Wed, 8 Jan 2020 at 22:16, Amit Kapila wrote: > > On Sat, Jan 4, 2020 at 6:48 PM Mahendra Singh Thalor > wrote: > > > > Hi All, > > > > In other thread "parallel vacuum options/syntax" [1], Amit Kapila asked > > opinion about syntax for making normal vacuum to parallel. From that > >

Re: [HACKERS] Block level parallel vacuum

2020-01-03 Thread Amit Kapila
On Fri, Jan 3, 2020 at 10:15 PM Robert Haas wrote: > > On Sun, Dec 29, 2019 at 4:23 PM Tomas Vondra > wrote: > > IMO there's not much reason for the leader not to participate. For > > regular queries the leader may be doing useful stuff (essentially > > running the non-parallel part of the

Re: [HACKERS] Block level parallel vacuum

2020-01-03 Thread Robert Haas
On Sun, Dec 29, 2019 at 4:23 PM Tomas Vondra wrote: > IMO there's not much reason for the leader not to participate. For > regular queries the leader may be doing useful stuff (essentially > running the non-parallel part of the query) but AFAIK for VAUCUM that's > not the case and the worker is

Re: [HACKERS] Block level parallel vacuum

2020-01-02 Thread Dilip Kumar
On Thu, Jan 2, 2020 at 9:03 AM Amit Kapila wrote: > > On Thu, Jan 2, 2020 at 8:29 AM Masahiko Sawada > wrote: > > > > On Tue, 31 Dec 2019 at 12:39, Amit Kapila wrote: > > > > > > On Mon, Dec 30, 2019 at 6:46 PM Tomas Vondra > > > wrote: > > > > > > > > On Mon, Dec 30, 2019 at 08:25:28AM +0530,

Re: [HACKERS] Block level parallel vacuum

2020-01-02 Thread Dilip Kumar
On Tue, Dec 31, 2019 at 9:09 AM Amit Kapila wrote: > > On Mon, Dec 30, 2019 at 6:46 PM Tomas Vondra > wrote: > > > > On Mon, Dec 30, 2019 at 08:25:28AM +0530, Amit Kapila wrote: > > >On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra > > > wrote: > > >> I think there's another question we need to ask

Re: [HACKERS] Block level parallel vacuum

2020-01-01 Thread Amit Kapila
On Thu, Jan 2, 2020 at 8:29 AM Masahiko Sawada wrote: > > On Tue, 31 Dec 2019 at 12:39, Amit Kapila wrote: > > > > On Mon, Dec 30, 2019 at 6:46 PM Tomas Vondra > > wrote: > > > > > > On Mon, Dec 30, 2019 at 08:25:28AM +0530, Amit Kapila wrote: > > > >On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra

Re: [HACKERS] Block level parallel vacuum

2020-01-01 Thread Masahiko Sawada
On Tue, 31 Dec 2019 at 12:39, Amit Kapila wrote: > > On Mon, Dec 30, 2019 at 6:46 PM Tomas Vondra > wrote: > > > > On Mon, Dec 30, 2019 at 08:25:28AM +0530, Amit Kapila wrote: > > >On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra > > > wrote: > > >> I think there's another question we need to ask -

Re: [HACKERS] Block level parallel vacuum

2019-12-30 Thread Amit Kapila
On Mon, Dec 30, 2019 at 6:37 PM Tomas Vondra wrote: > > On Mon, Dec 30, 2019 at 10:40:39AM +0530, Amit Kapila wrote: > >On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra > > wrote: > >> > > > >+1. It is already a separate patch and I think we can even discuss > >more on it in a new thread once the

Re: [HACKERS] Block level parallel vacuum

2019-12-30 Thread Amit Kapila
On Mon, Dec 30, 2019 at 6:46 PM Tomas Vondra wrote: > > On Mon, Dec 30, 2019 at 08:25:28AM +0530, Amit Kapila wrote: > >On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra > > wrote: > >> I think there's another question we need to ask - why to we introduce a > >> bitmask, instead of using regular

Re: [HACKERS] Block level parallel vacuum

2019-12-30 Thread Tomas Vondra
On Mon, Dec 30, 2019 at 08:25:28AM +0530, Amit Kapila wrote: On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra wrote: On Sun, Dec 29, 2019 at 10:06:23PM +0900, Masahiko Sawada wrote: >> v40-0001-Introduce-IndexAM-fields-for-parallel-vacuum.patch >>

Re: [HACKERS] Block level parallel vacuum

2019-12-30 Thread Tomas Vondra
On Mon, Dec 30, 2019 at 10:40:39AM +0530, Amit Kapila wrote: On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra wrote: On Sun, Dec 29, 2019 at 10:06:23PM +0900, Masahiko Sawada wrote: >> >> v40-0003-Add-FAST-option-to-vacuum-command.patch >> >> >> I

Re: [HACKERS] Block level parallel vacuum

2019-12-29 Thread Amit Kapila
On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra wrote: > > On Sun, Dec 29, 2019 at 10:06:23PM +0900, Masahiko Sawada wrote: > >> > >> v40-0003-Add-FAST-option-to-vacuum-command.patch > >> > >> > >> I do have a bit of an issue with this part - I'm not

Re: [HACKERS] Block level parallel vacuum

2019-12-29 Thread Amit Kapila
On Mon, Dec 30, 2019 at 2:53 AM Tomas Vondra wrote: > > On Sun, Dec 29, 2019 at 10:06:23PM +0900, Masahiko Sawada wrote: > >> v40-0001-Introduce-IndexAM-fields-for-parallel-vacuum.patch > >> --- > >> > >> I wonder if

Re: [HACKERS] Block level parallel vacuum

2019-12-29 Thread Tomas Vondra
On Sun, Dec 29, 2019 at 10:06:23PM +0900, Masahiko Sawada wrote: On Fri, 27 Dec 2019 at 11:24, Tomas Vondra wrote: Hi, On Wed, Dec 25, 2019 at 09:17:16PM +0900, Masahiko Sawada wrote: >On Tue, 24 Dec 2019 at 15:46, Masahiko Sawada > wrote: >> >> On Tue, 24 Dec 2019 at 15:44, Amit Kapila

Re: [HACKERS] Block level parallel vacuum

2019-12-26 Thread Tomas Vondra
Hi, On Wed, Dec 25, 2019 at 09:17:16PM +0900, Masahiko Sawada wrote: On Tue, 24 Dec 2019 at 15:46, Masahiko Sawada wrote: On Tue, 24 Dec 2019 at 15:44, Amit Kapila wrote: > > On Tue, Dec 24, 2019 at 12:08 PM Masahiko Sawada > wrote: > > > > > > The first patches look good to me. I'm

Re: [HACKERS] Block level parallel vacuum

2019-12-26 Thread Mahendra Singh
On Wed, 25 Dec 2019 at 17:47, Masahiko Sawada wrote: > > On Tue, 24 Dec 2019 at 15:46, Masahiko Sawada > wrote: > > > > On Tue, 24 Dec 2019 at 15:44, Amit Kapila wrote: > > > > > > On Tue, Dec 24, 2019 at 12:08 PM Masahiko Sawada > > > wrote: > > > > > > > > > > > > The first patches look good

Re: [HACKERS] Block level parallel vacuum

2019-12-25 Thread Masahiko Sawada
On Tue, 24 Dec 2019 at 15:46, Masahiko Sawada wrote: > > On Tue, 24 Dec 2019 at 15:44, Amit Kapila wrote: > > > > On Tue, Dec 24, 2019 at 12:08 PM Masahiko Sawada > > wrote: > > > > > > > > > The first patches look good to me. I'm reviewing other patches and > > > will post comments if there

Re: [HACKERS] Block level parallel vacuum

2019-12-23 Thread Masahiko Sawada
On Tue, 24 Dec 2019 at 15:44, Amit Kapila wrote: > > On Tue, Dec 24, 2019 at 12:08 PM Masahiko Sawada > wrote: > > > > > > The first patches look good to me. I'm reviewing other patches and > > will post comments if there is. > > Oops I meant first "two" patches look good to me. > > Okay, feel

Re: [HACKERS] Block level parallel vacuum

2019-12-23 Thread Amit Kapila
On Tue, Dec 24, 2019 at 12:08 PM Masahiko Sawada wrote: > > > The first patches look good to me. I'm reviewing other patches and > will post comments if there is. > Okay, feel free to address few comments raised by Mahendra along with whatever you find. -- With Regards, Amit Kapila.

Re: [HACKERS] Block level parallel vacuum

2019-12-23 Thread Masahiko Sawada
On Mon, 23 Dec 2019 at 19:41, Amit Kapila wrote: > > On Fri, Dec 20, 2019 at 12:13 PM Masahiko Sawada > wrote: > > > > I've attached the updated version patch that incorporated the all > > review comments I go so far. > > > > I have further edited the first two patches posted by you. The >

Re: [HACKERS] Block level parallel vacuum

2019-12-23 Thread Amit Kapila
On Mon, Dec 23, 2019 at 11:02 PM Mahendra Singh wrote: > > 5. I am not sure that I am right but I can see that we are not consistent > while ending the single line comments. > > I think, if single line comment is started with "upper case letter", then we > should not put period(dot) at the end

Re: [HACKERS] Block level parallel vacuum

2019-12-23 Thread Mahendra Singh
g_indg_On Mon, 23 Dec 2019 at 16:11, Amit Kapila wrote: > > On Fri, Dec 20, 2019 at 12:13 PM Masahiko Sawada > wrote: > > > > I've attached the updated version patch that incorporated the all > > review comments I go so far. > > > > I have further edited the first two patches posted by you. The

Re: [HACKERS] Block level parallel vacuum

2019-12-23 Thread Masahiko Sawada
On Mon, 23 Dec 2019 at 16:24, Mahendra Singh wrote: > > On Fri, 20 Dec 2019 at 17:17, Prabhat Sahu > wrote: > > > > Hi, > > > > While testing this feature with parallel vacuum on "TEMPORARY TABLE", I got > > a server crash on PG Head+V36_patch. > > Changed configuration parameters and Stack

Re: [HACKERS] Block level parallel vacuum

2019-12-22 Thread Mahendra Singh
On Fri, 20 Dec 2019 at 17:17, Prabhat Sahu wrote: > > Hi, > > While testing this feature with parallel vacuum on "TEMPORARY TABLE", I got a > server crash on PG Head+V36_patch. > Changed configuration parameters and Stack trace are as below: > > autovacuum = on > max_worker_processes = 4 >

Re: [HACKERS] Block level parallel vacuum

2019-12-21 Thread Amit Kapila
On Fri, Dec 20, 2019 at 5:17 PM Prabhat Sahu wrote: > Hi, > > While testing this feature with parallel vacuum on "TEMPORARY TABLE", I > got a server crash on PG Head+V36_patch. > >From the call stack, it is not clear whether it is related to a patch at all. Have you checked your test with and

Re: [HACKERS] Block level parallel vacuum

2019-12-20 Thread Prabhat Sahu
Hi, While testing this feature with parallel vacuum on "TEMPORARY TABLE", I got a server crash on PG Head+V36_patch. Changed configuration parameters and Stack trace are as below: autovacuum = on max_worker_processes = 4 shared_buffers = 10MB max_parallel_workers = 8

Re: [HACKERS] Block level parallel vacuum

2019-12-19 Thread Masahiko Sawada
On Thu, 19 Dec 2019 at 22:48, Robert Haas wrote: > > On Thu, Dec 19, 2019 at 12:41 AM Masahiko Sawada > wrote: > > Attached the updated version patch. This version patch incorporates > > the above comments and the comments from Mahendra. I also fixed one > > bug around determining the indexes

Re: [HACKERS] Block level parallel vacuum

2019-12-19 Thread Robert Haas
On Thu, Dec 19, 2019 at 12:41 AM Masahiko Sawada wrote: > Attached the updated version patch. This version patch incorporates > the above comments and the comments from Mahendra. I also fixed one > bug around determining the indexes that are vacuumed in parallel based > on their option and size.

Re: [HACKERS] Block level parallel vacuum

2019-12-19 Thread Amit Kapila
On Thu, Dec 19, 2019 at 11:11 AM Masahiko Sawada wrote: > > On Wed, 18 Dec 2019 at 19:06, Amit Kapila wrote: > > > > - /* Cap by the worker we computed at the beginning of parallel lazy vacuum */ > - nworkers = Min(nworkers, lps->pcxt->nworkers); > + /* > + * The number of workers required for

Re: [HACKERS] Block level parallel vacuum

2019-12-18 Thread Mahendra Singh
On Wed, 18 Dec 2019 at 12:07, Amit Kapila wrote: > > [please trim extra text before responding] > > On Wed, Dec 18, 2019 at 12:01 PM Mahendra Singh wrote: > > > > On Tue, 10 Dec 2019 at 00:30, Mahendra Singh wrote: > > > > > > > > > 3. > > > After v35 patch, vacuum.sql regression test is taking

  1   2   3   4   >