Re: [HACKERS] Block level parallel vacuum

2019-10-08 Thread Masahiko Sawada
On Sat, Oct 5, 2019 at 4:36 PM Dilip Kumar wrote: > > Few more comments > > > 1. > +static int > +compute_parallel_workers(Relation onerel, int nrequested, int nindexes) > +{ > + int parallel_workers; > + bool leaderparticipates = true; > > Seems like this function is

Re: [HACKERS] Block level parallel vacuum

2019-10-07 Thread Masahiko Sawada
On Fri, Oct 4, 2019 at 7:05 PM Dilip Kumar wrote: > > On Fri, Oct 4, 2019 at 11:01 AM Amit Kapila wrote: > > > > On Fri, Oct 4, 2019 at 10:28 AM Masahiko Sawada > > wrote: > >> > Some more comments.. Thank you! > 1. > + for (idx = 0; idx < nindexes; idx++) > + { > + if (!for_cleanup) > + lazy

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Amit Kapila
On Mon, Oct 7, 2019 at 10:00 AM Masahiko Sawada wrote: > On Sat, Oct 5, 2019 at 8:22 PM Amit Kapila > wrote: > > > > On Fri, Oct 4, 2019 at 7:57 PM Masahiko Sawada > wrote: > >> > >> On Fri, Oct 4, 2019 at 2:31 PM Amit Kapila > wrote: > >> >> > >> > > >> > Do we really need to log all those me

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Masahiko Sawada
On Sat, Oct 5, 2019 at 8:22 PM Amit Kapila wrote: > > On Fri, Oct 4, 2019 at 7:57 PM Masahiko Sawada wrote: >> >> On Fri, Oct 4, 2019 at 2:31 PM Amit Kapila wrote: >> >> >> > >> > Do we really need to log all those messages? The other places where we >> > launch parallel workers doesn't seem t

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Masahiko Sawada
On Sun, Oct 6, 2019 at 7:59 PM Amit Kapila wrote: > > On Fri, Oct 4, 2019 at 7:34 PM Masahiko Sawada wrote: >> >> On Fri, Oct 4, 2019 at 2:02 PM Amit Kapila wrote: >> >> >> >> I'd also prefer to use maintenance_work_mem at max during parallel >> >> vacuum regardless of the number of parallel wor

Re: [HACKERS] Block level parallel vacuum

2019-10-06 Thread Amit Kapila
On Fri, Oct 4, 2019 at 7:34 PM Masahiko Sawada wrote: > On Fri, Oct 4, 2019 at 2:02 PM Amit Kapila > wrote: > >> > >> I'd also prefer to use maintenance_work_mem at max during parallel > >> vacuum regardless of the number of parallel workers. This is current > >> implementation. In lazy vacuum t

Re: [HACKERS] Block level parallel vacuum

2019-10-05 Thread Amit Kapila
On Fri, Oct 4, 2019 at 7:57 PM Masahiko Sawada wrote: > On Fri, Oct 4, 2019 at 2:31 PM Amit Kapila > wrote: > >> > > > > Do we really need to log all those messages? The other places where we > launch parallel workers doesn't seem to be using such messages. Why do you > think it is important t

Re: [HACKERS] Block level parallel vacuum

2019-10-05 Thread Dilip Kumar
On Fri, Oct 4, 2019 at 3:35 PM Dilip Kumar wrote: > > On Fri, Oct 4, 2019 at 11:01 AM Amit Kapila wrote: > > > > On Fri, Oct 4, 2019 at 10:28 AM Masahiko Sawada > > wrote: > >> > Some more comments.. > 1. > + for (idx = 0; idx < nindexes; idx++) > + { > + if (!for_cleanup) > + lazy_vacuum_index

Re: [HACKERS] Block level parallel vacuum

2019-10-04 Thread Masahiko Sawada
On Fri, Oct 4, 2019 at 2:31 PM Amit Kapila wrote: > > On Fri, Oct 4, 2019 at 10:28 AM Masahiko Sawada wrote: >> >> On Thu, Oct 3, 2019 at 9:06 PM Dilip Kumar wrote: >> > >> > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada >> > wrote: >> > >> > + else >> > + { >> > + if (for_cleanup) >> > + { >

Re: [HACKERS] Block level parallel vacuum

2019-10-04 Thread Masahiko Sawada
On Fri, Oct 4, 2019 at 2:02 PM Amit Kapila wrote: > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada wrote: >> >> On Sat, Sep 21, 2019 at 9:31 PM Amit Kapila wrote: >> > * >> > In function compute_parallel_workers, don't we want to cap the number >> > of workers based on maintenance_work_mem as

Re: [HACKERS] Block level parallel vacuum

2019-10-04 Thread vignesh C
On Fri, Oct 4, 2019 at 4:18 PM Amit Kapila wrote: > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada wrote: >> >> On Sat, Sep 21, 2019 at 9:31 PM Amit Kapila wrote: >> > One comment: We can check if parallel_workers is within range something within MAX_PARALLEL_WORKER_LIMIT. + int parallel_worke

Re: [HACKERS] Block level parallel vacuum

2019-10-04 Thread Amit Kapila
On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada wrote: > On Sat, Sep 21, 2019 at 9:31 PM Amit Kapila > wrote: > > > > * > > +end_parallel_vacuum(LVParallelState *lps, Relation *Irel, int nindexes) > > { > > .. > > + /* Shutdown worker processes and destroy the parallel context */ > > + WaitForPar

Re: [HACKERS] Block level parallel vacuum

2019-10-04 Thread Dilip Kumar
On Fri, Oct 4, 2019 at 11:01 AM Amit Kapila wrote: > > On Fri, Oct 4, 2019 at 10:28 AM Masahiko Sawada wrote: >> Some more comments.. 1. + for (idx = 0; idx < nindexes; idx++) + { + if (!for_cleanup) + lazy_vacuum_index(Irel[idx], &stats[idx], vacrelstats->dead_tuples, + vacrelstats->old_live_t

Re: [HACKERS] Block level parallel vacuum

2019-10-03 Thread Amit Kapila
On Fri, Oct 4, 2019 at 10:28 AM Masahiko Sawada wrote: > On Thu, Oct 3, 2019 at 9:06 PM Dilip Kumar wrote: > > > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada > wrote: > > > > + else > > + { > > + if (for_cleanup) > > + { > > + if (lps->nworkers_requested > 0) > > + appendStringInfo(&buf, >

Re: [HACKERS] Block level parallel vacuum

2019-10-03 Thread Amit Kapila
On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada wrote: > On Sat, Sep 21, 2019 at 9:31 PM Amit Kapila > wrote: > > * > > In function compute_parallel_workers, don't we want to cap the number > > of workers based on maintenance_work_mem as we do in > > plan_create_index_workers? > > > > The basic p

Re: [HACKERS] Block level parallel vacuum

2019-10-03 Thread Masahiko Sawada
On Thu, Oct 3, 2019 at 9:06 PM Dilip Kumar wrote: > > On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada wrote: > > > I have started reviewing this patch and I have some cosmetic comments. > I will continue the review tomorrow. > Thank you for reviewing the patch! > +This change adds PARALLEL optio

Re: [HACKERS] Block level parallel vacuum

2019-10-03 Thread Dilip Kumar
On Wed, Oct 2, 2019 at 7:29 PM Masahiko Sawada wrote: > I have started reviewing this patch and I have some cosmetic comments. I will continue the review tomorrow. +This change adds PARALLEL option to VACUUM command that enable us to +perform index vacuuming and index cleanup with background +wor

Re: [HACKERS] Block level parallel vacuum

2019-10-02 Thread Masahiko Sawada
On Sat, Sep 21, 2019 at 9:31 PM Amit Kapila wrote: > > On Fri, Jun 7, 2019 at 12:03 PM Masahiko Sawada wrote: > > > > Since the previous version patch conflicts with current HEAD, I've > > attached the updated version patches. > > > Thank you for reviewing this patch! > Review comments: > -

Re: [HACKERS] Block level parallel vacuum

2019-10-01 Thread Masahiko Sawada
On Tue, Oct 1, 2019 at 10:31 PM Amit Kapila wrote: > > On Sat, Sep 21, 2019 at 6:01 PM Amit Kapila wrote: >> >> On Fri, Jun 7, 2019 at 12:03 PM Masahiko Sawada >> wrote: >> > >> > Since the previous version patch conflicts with current HEAD, I've >> > attached the updated version patches. >> >

Re: [HACKERS] Block level parallel vacuum

2019-10-01 Thread Amit Kapila
On Sat, Sep 21, 2019 at 6:01 PM Amit Kapila wrote: > On Fri, Jun 7, 2019 at 12:03 PM Masahiko Sawada > wrote: > > > > Since the previous version patch conflicts with current HEAD, I've > > attached the updated version patches. > > > > Review comments: > -- > Sawada-S

Re: [HACKERS] Block level parallel vacuum

2019-09-21 Thread Amit Kapila
On Fri, Jun 7, 2019 at 12:03 PM Masahiko Sawada wrote: > > Since the previous version patch conflicts with current HEAD, I've > attached the updated version patches. > Review comments: -- * indexes on the relation which further limited by + . /which further

Re: [HACKERS] Block level parallel vacuum

2019-07-20 Thread Sergei Kornilov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Hello I reviewed v25 patches and have just a few notes. missed syno

Re: [HACKERS] Block level parallel vacuum

2019-06-06 Thread Masahiko Sawada
On Wed, Apr 10, 2019 at 2:19 PM Masahiko Sawada wrote: > > On Mon, Apr 8, 2019 at 7:25 PM Kyotaro HORIGUCHI > wrote: > > > > Hello. > > > > # Is this still living? I changed the status to "needs review" > > > > At Sat, 6 Apr 2019 06:47:32 +0900, Masahiko Sawada > > wrote in > > > > > > Indeed

Re: [HACKERS] Block level parallel vacuum

2019-04-09 Thread Masahiko Sawada
On Mon, Apr 8, 2019 at 7:25 PM Kyotaro HORIGUCHI wrote: > > Hello. > > # Is this still living? I changed the status to "needs review" > > At Sat, 6 Apr 2019 06:47:32 +0900, Masahiko Sawada > wrote in > > > Indeed. How about the following description? > > > > > > > Attached the updated version p

Re: [HACKERS] Block level parallel vacuum

2019-04-08 Thread Kyotaro HORIGUCHI
Hello. # Is this still living? I changed the status to "needs review" At Sat, 6 Apr 2019 06:47:32 +0900, Masahiko Sawada wrote in > > Indeed. How about the following description? > > > > Attached the updated version patches. Thanks. heapam.h is including access/parallel.h but the file doesn

Re: [HACKERS] Block level parallel vacuum

2019-04-05 Thread Masahiko Sawada
On Fri, Apr 5, 2019 at 4:10 PM Masahiko Sawada wrote: > > On Fri, Apr 5, 2019 at 3:47 PM Kyotaro HORIGUCHI > wrote: > > > > Thank you for the rebased version. > > > > At Fri, 5 Apr 2019 13:59:36 +0900, Masahiko Sawada > > wrote in > > > > > Thank you for the notice. Rebased. > > > > +inte

Re: [HACKERS] Block level parallel vacuum

2019-04-05 Thread Masahiko Sawada
On Fri, Apr 5, 2019 at 3:47 PM Kyotaro HORIGUCHI wrote: > > Thank you for the rebased version. > > At Fri, 5 Apr 2019 13:59:36 +0900, Masahiko Sawada > wrote in > > Thank you for the notice. Rebased. > > +integer > + > + > + Specifies parallel degree for PARALLEL option. The >

Re: [HACKERS] Block level parallel vacuum

2019-04-04 Thread Kyotaro HORIGUCHI
Thank you for the rebased version. At Fri, 5 Apr 2019 13:59:36 +0900, Masahiko Sawada wrote in > Thank you for the notice. Rebased. +integer + + + Specifies parallel degree for PARALLEL option. The + value must be at least 1. If the parallel degree + integer is omit

Re: [HACKERS] Block level parallel vacuum

2019-04-04 Thread Masahiko Sawada
On Fri, Apr 5, 2019 at 4:51 AM Robert Haas wrote: > > On Thu, Apr 4, 2019 at 6:28 AM Masahiko Sawada wrote: > > These patches conflict with the current HEAD. Attached the updated patches. > > They'll need another rebase. > Thank you for the notice. Rebased. Regards, -- Masahiko Sawada NIPPON

Re: [HACKERS] Block level parallel vacuum

2019-04-04 Thread Robert Haas
On Thu, Apr 4, 2019 at 6:28 AM Masahiko Sawada wrote: > These patches conflict with the current HEAD. Attached the updated patches. They'll need another rebase. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Block level parallel vacuum

2019-04-04 Thread Masahiko Sawada
On Fri, Mar 29, 2019 at 11:26 AM Masahiko Sawada wrote: > > On Fri, Mar 29, 2019 at 4:53 AM Robert Haas wrote: > > > > On Tue, Mar 26, 2019 at 10:31 AM Masahiko Sawada > > wrote: > > > Thank you for reviewing the patch. > > > > I don't think the approach in v20-0001 is quite right. > > > >

Re: [HACKERS] Block level parallel vacuum

2019-03-29 Thread Masahiko Sawada
On Fri, Mar 29, 2019 at 9:28 PM Robert Haas wrote: > > On Thu, Mar 28, 2019 at 10:27 PM Masahiko Sawada > wrote: > > You're right, the previous patches are wrong. Attached the updated > > version patches. > > 0001 looks good now. Committed. > Thank you! Regards, -- Masahiko Sawada NIPPON TEL

Re: [HACKERS] Block level parallel vacuum

2019-03-29 Thread Robert Haas
On Thu, Mar 28, 2019 at 10:27 PM Masahiko Sawada wrote: > You're right, the previous patches are wrong. Attached the updated > version patches. 0001 looks good now. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: [HACKERS] Block level parallel vacuum

2019-03-28 Thread Masahiko Sawada
On Fri, Mar 29, 2019 at 4:53 AM Robert Haas wrote: > > On Tue, Mar 26, 2019 at 10:31 AM Masahiko Sawada > wrote: > > Thank you for reviewing the patch. > > I don't think the approach in v20-0001 is quite right. > > if (strcmp(opt->defname, "verbose") == 0) > -params.options

Re: [HACKERS] Block level parallel vacuum

2019-03-28 Thread Robert Haas
On Tue, Mar 26, 2019 at 10:31 AM Masahiko Sawada wrote: > Thank you for reviewing the patch. I don't think the approach in v20-0001 is quite right. if (strcmp(opt->defname, "verbose") == 0) -params.options |= VACOPT_VERBOSE; +params.options |= defGetBoolean(opt)

Re: [HACKERS] Block level parallel vacuum

2019-03-26 Thread Haribabu Kommi
On Wed, Mar 27, 2019 at 1:31 AM Masahiko Sawada wrote: > On Tue, Mar 26, 2019 at 10:19 AM Haribabu Kommi > wrote: > > > > > > + for (i = 0; i < nindexes; i++) > > + { > > + LVIndStats *s = &(copied_indstats[i]); > > + > > + if (s->updated) > > + lazy_update_index_statistics(Irel[i], &(s->stats))

Re: [HACKERS] Block level parallel vacuum

2019-03-26 Thread Masahiko Sawada
On Tue, Mar 26, 2019 at 10:19 AM Haribabu Kommi wrote: > > > On Fri, Mar 22, 2019 at 4:06 PM Masahiko Sawada wrote: >> >> >> Attached the updated version patch. 0001 patch allows all existing >> vacuum options an boolean argument. 0002 patch introduces parallel >> lazy vacuum. 0003 patch adds -P

Re: [HACKERS] Block level parallel vacuum

2019-03-26 Thread Kyotaro HORIGUCHI
Hello. I forgot to mention a point. At Fri, 22 Mar 2019 14:02:36 +0900, Masahiko Sawada wrote in > Attached the updated version patch. 0001 patch allows all existing > vacuum options an boolean argument. 0002 patch introduces parallel > lazy vacuum. 0003 patch adds -P (--parallel) option to vac

Re: [HACKERS] Block level parallel vacuum

2019-03-26 Thread Kyotaro HORIGUCHI
Hello. At Thu, 21 Mar 2019 15:51:40 -0400, Robert Haas wrote in > On Tue, Mar 19, 2019 at 3:59 AM Kyotaro HORIGUCHI > wrote: > > The leader doesn't continue heap-scan while index vacuuming is > > running. And the index-page-scan seems eat up CPU easily. If > > index vacuum can run simultaneous

Re: [HACKERS] Block level parallel vacuum

2019-03-25 Thread Haribabu Kommi
On Fri, Mar 22, 2019 at 4:06 PM Masahiko Sawada wrote: > > Attached the updated version patch. 0001 patch allows all existing > vacuum options an boolean argument. 0002 patch introduces parallel > lazy vacuum. 0003 patch adds -P (--parallel) option to vacuumdb > command. > Thanks for sharing the

Re: [HACKERS] Block level parallel vacuum

2019-03-21 Thread Masahiko Sawada
On Fri, Mar 22, 2019 at 4:53 AM Robert Haas wrote: > > On Tue, Mar 19, 2019 at 7:26 AM Masahiko Sawada wrote: > > In parsing vacuum command, since only PARALLEL option can have an > > argument I've added the check in ExecVacuum to erroring out when other > > options have an argument. But it might

Re: [HACKERS] Block level parallel vacuum

2019-03-21 Thread Robert Haas
On Tue, Mar 19, 2019 at 7:26 AM Masahiko Sawada wrote: > In parsing vacuum command, since only PARALLEL option can have an > argument I've added the check in ExecVacuum to erroring out when other > options have an argument. But it might be good to make other vacuum > options (perhaps except for DI

Re: [HACKERS] Block level parallel vacuum

2019-03-21 Thread Robert Haas
On Tue, Mar 19, 2019 at 3:59 AM Kyotaro HORIGUCHI wrote: > The leader doesn't continue heap-scan while index vacuuming is > running. And the index-page-scan seems eat up CPU easily. If > index vacuum can run simultaneously with the next heap scan > phase, we can make index scan finishes almost the

Re: [HACKERS] Block level parallel vacuum

2019-03-21 Thread Sergei Kornilov
Hello > * in_parallel is true if we're performing parallel lazy vacuum. Since any > * updates are not allowed during parallel mode we don't update statistics > * but set the index bulk-deletion result to *stats. Otherwise we update it > * and set NULL. lazy_cleanup_index has in_parallel argument

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Masahiko Sawada
On Tue, Mar 19, 2019 at 7:29 PM Kyotaro HORIGUCHI wrote: > > At Tue, 19 Mar 2019 17:51:32 +0900, Masahiko Sawada > wrote in > > On Tue, Mar 19, 2019 at 10:39 AM Haribabu Kommi > > wrote: > > > The performance results are good. Do we want to add the recommended > > > size in the document for th

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Masahiko Sawada
On Tue, Mar 19, 2019 at 7:15 PM Kyotaro HORIGUCHI wrote: > > At Tue, 19 Mar 2019 19:01:06 +0900, Masahiko Sawada > wrote in > > On Tue, Mar 19, 2019 at 4:59 PM Kyotaro HORIGUCHI > > wrote: > > > > > > At Tue, 19 Mar 2019 13:31:04 +0900, Masahiko Sawada > > > wrote in > > > > > > > > For in

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Kyotaro HORIGUCHI
At Tue, 19 Mar 2019 17:51:32 +0900, Masahiko Sawada wrote in > On Tue, Mar 19, 2019 at 10:39 AM Haribabu Kommi > wrote: > > The performance results are good. Do we want to add the recommended > > size in the document for the parallel option? the parallel option for > > smaller > > tables can l

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Kyotaro HORIGUCHI
At Tue, 19 Mar 2019 19:01:06 +0900, Masahiko Sawada wrote in > On Tue, Mar 19, 2019 at 4:59 PM Kyotaro HORIGUCHI > wrote: > > > > At Tue, 19 Mar 2019 13:31:04 +0900, Masahiko Sawada > > wrote in > > > > > > For indexes=4,8,16, the cases with parallel_degree=4,8,16 behave > > > > almost the

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Masahiko Sawada
On Tue, Mar 19, 2019 at 4:59 PM Kyotaro HORIGUCHI wrote: > > At Tue, 19 Mar 2019 13:31:04 +0900, Masahiko Sawada > wrote in > > > For indexes=4,8,16, the cases with parallel_degree=4,8,16 behave > > > almost the same. I suspect that the indexes are too-small and all > > > the index pages were o

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Masahiko Sawada
On Tue, Mar 19, 2019 at 10:39 AM Haribabu Kommi wrote: > > > On Mon, Mar 18, 2019 at 1:58 PM Masahiko Sawada wrote: >> >> On Tue, Feb 26, 2019 at 7:20 PM Masahiko Sawada >> wrote: >> > >> > On Tue, Feb 26, 2019 at 1:35 PM Haribabu Kommi >> > wrote: >> > > >> > > On Thu, Feb 14, 2019 at 9:17 P

Re: [HACKERS] Block level parallel vacuum

2019-03-19 Thread Kyotaro HORIGUCHI
At Tue, 19 Mar 2019 13:31:04 +0900, Masahiko Sawada wrote in > > For indexes=4,8,16, the cases with parallel_degree=4,8,16 behave > > almost the same. I suspect that the indexes are too-small and all > > the index pages were on memory and CPU is saturated. Maybe you > > had four cores and parall

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Masahiko Sawada
On Mon, Mar 18, 2019 at 7:06 PM Kyotaro HORIGUCHI wrote: > > Hello. > > At Mon, 18 Mar 2019 11:54:42 +0900, Masahiko Sawada > wrote in > > Here is the performance test results. I've setup a 500MB table with > > several indexes and made 10% of table dirty before each vacuum. > > Compared executi

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Haribabu Kommi
On Mon, Mar 18, 2019 at 1:58 PM Masahiko Sawada wrote: > On Tue, Feb 26, 2019 at 7:20 PM Masahiko Sawada > wrote: > > > > On Tue, Feb 26, 2019 at 1:35 PM Haribabu Kommi > wrote: > > > > > > On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada > wrote: > > >> > > >> Thank you. Attached the rebased p

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Masahiko Sawada
On Tue, Mar 19, 2019 at 3:05 AM Robert Haas wrote: > > On Thu, Mar 14, 2019 at 3:37 AM Masahiko Sawada wrote: > > BTW your patch seems to not apply to the current HEAD cleanly and to > > need to update the comment of vacuum(). > > Yeah, I omitted some hunks by being stupid with 'git'. > > Since y

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Robert Haas
On Thu, Mar 14, 2019 at 3:37 AM Masahiko Sawada wrote: > Attached the updated patch you proposed and the patch that converts > the grammer productions for the VACUUM option on top of the former > patch. The latter patch moves VacuumOption to vacuum.h since the > parser no longer needs such informa

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Robert Haas
On Thu, Mar 14, 2019 at 3:37 AM Masahiko Sawada wrote: > BTW your patch seems to not apply to the current HEAD cleanly and to > need to update the comment of vacuum(). Yeah, I omitted some hunks by being stupid with 'git'. Since you seem to like the approach, I put back the hunks I intended to h

Re: [HACKERS] Block level parallel vacuum

2019-03-18 Thread Kyotaro HORIGUCHI
Hello. At Mon, 18 Mar 2019 11:54:42 +0900, Masahiko Sawada wrote in > Here is the performance test results. I've setup a 500MB table with > several indexes and made 10% of table dirty before each vacuum. > Compared execution time of the patched postgrse with the current HEAD > (at 'speed_up' co

Re: [HACKERS] Block level parallel vacuum

2019-03-17 Thread Masahiko Sawada
On Tue, Feb 26, 2019 at 7:20 PM Masahiko Sawada wrote: > > On Tue, Feb 26, 2019 at 1:35 PM Haribabu Kommi > wrote: > > > > On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada > > wrote: > >> > >> Thank you. Attached the rebased patch. > > > > > > I ran some performance tests to compare the paralle

Re: [HACKERS] Block level parallel vacuum

2019-03-14 Thread Masahiko Sawada
On Thu, Mar 14, 2019 at 6:41 AM Robert Haas wrote: > > On Wed, Mar 13, 2019 at 1:56 AM Masahiko Sawada wrote: > > I don't have a strong opinion but the using a Node would be more > > suitable in the future when we add more options to vacuum. And it > > seems to me that it's unlikely to change a N

Re: [HACKERS] Block level parallel vacuum

2019-03-13 Thread Robert Haas
On Wed, Mar 13, 2019 at 1:56 AM Masahiko Sawada wrote: > I don't have a strong opinion but the using a Node would be more > suitable in the future when we add more options to vacuum. And it > seems to me that it's unlikely to change a Node to a plain struct. So > there is an idea of doing it now a

Re: [HACKERS] Block level parallel vacuum

2019-03-12 Thread Masahiko Sawada
On Fri, Mar 8, 2019 at 12:22 AM Robert Haas wrote: > > On Wed, Mar 6, 2019 at 10:58 PM Masahiko Sawada wrote: > > > Why make it a Node? I mean I think a struct makes sense, but what's > > > the point of giving it a NodeTag? > > > > Well, the main point is consistency with other nodes and keep th

Re: [HACKERS] Block level parallel vacuum

2019-03-07 Thread Robert Haas
On Wed, Mar 6, 2019 at 10:58 PM Masahiko Sawada wrote: > > Why make it a Node? I mean I think a struct makes sense, but what's > > the point of giving it a NodeTag? > > Well, the main point is consistency with other nodes and keep the code clean. It looks to me like if we made it a plain struct

Re: [HACKERS] Block level parallel vacuum

2019-03-06 Thread Masahiko Sawada
On Thu, Mar 7, 2019 at 2:54 AM Robert Haas wrote: > > On Wed, Mar 6, 2019 at 1:26 AM Masahiko Sawada wrote: > > Okay, attached the latest version of patch set. I've incorporated all > > comments I got and separated the patch for making vacuum options a > > Node (0001 patch). And the patch doesn't

Re: [HACKERS] Block level parallel vacuum

2019-03-06 Thread Robert Haas
On Wed, Mar 6, 2019 at 1:26 AM Masahiko Sawada wrote: > Okay, attached the latest version of patch set. I've incorporated all > comments I got and separated the patch for making vacuum options a > Node (0001 patch). And the patch doesn't use parallel_workers. It > might be proposed in the another

Re: [HACKERS] Block level parallel vacuum

2019-03-05 Thread Masahiko Sawada
On Mon, Mar 4, 2019 at 10:27 AM Masahiko Sawada wrote: > > On Sat, Mar 2, 2019 at 3:54 AM Robert Haas wrote: > > > > On Fri, Mar 1, 2019 at 12:19 AM Masahiko Sawada > > wrote: > > > > I wonder if we really want this behavior. Should a setting that > > > > controls the degree of parallelism whe

Re: [HACKERS] Block level parallel vacuum

2019-03-03 Thread Masahiko Sawada
On Sat, Mar 2, 2019 at 3:54 AM Robert Haas wrote: > > On Fri, Mar 1, 2019 at 12:19 AM Masahiko Sawada wrote: > > > I wonder if we really want this behavior. Should a setting that > > > controls the degree of parallelism when scanning the table also affect > > > VACUUM? I tend to think that we p

Re: [HACKERS] Block level parallel vacuum

2019-03-01 Thread Robert Haas
On Fri, Mar 1, 2019 at 12:19 AM Masahiko Sawada wrote: > > I wonder if we really want this behavior. Should a setting that > > controls the degree of parallelism when scanning the table also affect > > VACUUM? I tend to think that we probably don't ever want VACUUM of a > > table to be parallel

Re: [HACKERS] Block level parallel vacuum

2019-02-28 Thread Masahiko Sawada
On Thu, Feb 28, 2019 at 2:44 AM Robert Haas wrote: > > On Thu, Feb 14, 2019 at 5:17 AM Masahiko Sawada wrote: > > Thank you. Attached the rebased patch. > > Here are some review comments. Thank you for reviewing the patches! > > + started by a single utility command. Currently, the par

Re: [HACKERS] Block level parallel vacuum

2019-02-27 Thread Robert Haas
On Thu, Feb 14, 2019 at 5:17 AM Masahiko Sawada wrote: > Thank you. Attached the rebased patch. Here are some review comments. + started by a single utility command. Currently, the parallel + utility commands that support the use of parallel workers are + CREATE INDEX an

Re: [HACKERS] Block level parallel vacuum

2019-02-26 Thread Masahiko Sawada
On Sat, Feb 23, 2019 at 10:28 PM Haribabu Kommi wrote: > > > On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada wrote: >> >> On Wed, Feb 13, 2019 at 9:32 PM Haribabu Kommi >> wrote: >> > >> > >> > On Sat, Feb 9, 2019 at 11:47 PM Masahiko Sawada >> > wrote: >> >> >> >> On Tue, Feb 5, 2019 at 12:1

Re: [HACKERS] Block level parallel vacuum

2019-02-26 Thread Masahiko Sawada
On Tue, Feb 26, 2019 at 1:35 PM Haribabu Kommi wrote: > > On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada wrote: >> >> Thank you. Attached the rebased patch. > > > I ran some performance tests to compare the parallelism benefits, Thank you for testing! > but I got some strange results of perfor

Re: [HACKERS] Block level parallel vacuum

2019-02-25 Thread Haribabu Kommi
On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada wrote: > Thank you. Attached the rebased patch. > I ran some performance tests to compare the parallelism benefits, but I got some strange results of performance overhead, may be it is because, I tested it on my laptop. FYI, Table schema: create

Re: [HACKERS] Block level parallel vacuum

2019-02-23 Thread Haribabu Kommi
On Thu, Feb 14, 2019 at 9:17 PM Masahiko Sawada wrote: > On Wed, Feb 13, 2019 at 9:32 PM Haribabu Kommi > wrote: > > > > > > On Sat, Feb 9, 2019 at 11:47 PM Masahiko Sawada > wrote: > >> > >> On Tue, Feb 5, 2019 at 12:14 PM Haribabu Kommi < > kommi.harib...@gmail.com> wrote: > >> > > >> > > >>

Re: [HACKERS] Block level parallel vacuum

2019-02-14 Thread Masahiko Sawada
On Wed, Feb 13, 2019 at 9:32 PM Haribabu Kommi wrote: > > > On Sat, Feb 9, 2019 at 11:47 PM Masahiko Sawada wrote: >> >> On Tue, Feb 5, 2019 at 12:14 PM Haribabu Kommi >> wrote: >> > >> > >> > On Fri, Feb 1, 2019 at 8:19 AM Masahiko Sawada >> > wrote: >> >> >> >> >> >> The passing stats = NUL

Re: [HACKERS] Block level parallel vacuum

2019-02-13 Thread Haribabu Kommi
On Sat, Feb 9, 2019 at 11:47 PM Masahiko Sawada wrote: > On Tue, Feb 5, 2019 at 12:14 PM Haribabu Kommi > wrote: > > > > > > On Fri, Feb 1, 2019 at 8:19 AM Masahiko Sawada > wrote: > >> > >> > >> The passing stats = NULL to amvacuumcleanup and ambulkdelete means the > >> first time execution. F

Re: [HACKERS] Block level parallel vacuum

2019-02-09 Thread Masahiko Sawada
On Tue, Feb 5, 2019 at 12:14 PM Haribabu Kommi wrote: > > > On Fri, Feb 1, 2019 at 8:19 AM Masahiko Sawada wrote: >> >> >> The passing stats = NULL to amvacuumcleanup and ambulkdelete means the >> first time execution. For example, btvacuumcleanup skips cleanup if >> it's not NULL.In the normal v

Re: [HACKERS] Block level parallel vacuum

2019-02-04 Thread Haribabu Kommi
On Fri, Feb 1, 2019 at 8:19 AM Masahiko Sawada wrote: > On Wed, Jan 30, 2019 at 2:06 AM Haribabu Kommi > wrote: > > > > > > > > > > + * Before starting parallel index vacuum and parallel cleanup index we > launch > > + * parallel workers. All parallel workers will exit after processed all > inde

Re: [HACKERS] Block level parallel vacuum

2019-02-02 Thread Masahiko Sawada
On Thu, Jan 31, 2019 at 10:18 PM Masahiko Sawada wrote: > > Thank you. I'll submit the updated patch set. > Attached the latest patch set. Regards, -- Masahiko Sawada NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center From 021a179d7696183394db60aedbd1acb0301ad4b0 Mon Sep

Re: [HACKERS] Block level parallel vacuum

2019-02-02 Thread Masahiko Sawada
On Sat, Feb 2, 2019 at 4:06 AM Amit Kapila wrote: > > On Fri, Feb 1, 2019 at 2:49 AM Masahiko Sawada wrote: > > > > On Wed, Jan 30, 2019 at 2:06 AM Haribabu Kommi > > wrote: > > > > Thank you. I'll submit the updated patch set. > > > > I don't see any chance of getting this committed in the nex

Re: [HACKERS] Block level parallel vacuum

2019-02-01 Thread Amit Kapila
On Fri, Feb 1, 2019 at 2:49 AM Masahiko Sawada wrote: > > On Wed, Jan 30, 2019 at 2:06 AM Haribabu Kommi > wrote: > > Thank you. I'll submit the updated patch set. > I don't see any chance of getting this committed in the next few days, so, moved to next CF. Thanks for working on this and I h

Re: [HACKERS] Block level parallel vacuum

2019-01-31 Thread Masahiko Sawada
On Wed, Jan 30, 2019 at 2:06 AM Haribabu Kommi wrote: > > > On Thu, Jan 24, 2019 at 1:16 PM Masahiko Sawada wrote: >> >> >> Attached the latest patches. > > > Thanks for the updated patches. > Some more code review comments. > Thank you! > + started by a single utility command. Current

Re: [HACKERS] Block level parallel vacuum

2019-01-29 Thread Haribabu Kommi
On Thu, Jan 24, 2019 at 1:16 PM Masahiko Sawada wrote: > > Attached the latest patches. > Thanks for the updated patches. Some more code review comments. + started by a single utility command. Currently, the parallel + utility commands that support the use of parallel workers a

Re: [HACKERS] Block level parallel vacuum

2019-01-23 Thread Masahiko Sawada
On Tue, Jan 22, 2019 at 9:59 PM Haribabu Kommi wrote: > > > Thanks for the latest patch. I have some more minor comments. Thank you for reviewing the patch. > > + Execute index vacuum and cleanup index in parallel with > > Better to use vacuum index and cleanup index? This is in same with >

Re: [HACKERS] Block level parallel vacuum

2019-01-22 Thread Haribabu Kommi
On Fri, Jan 18, 2019 at 11:42 PM Masahiko Sawada wrote: > On Fri, Jan 18, 2019 at 10:38 AM Haribabu Kommi > wrote: > > > > > > On Tue, Jan 15, 2019 at 6:00 PM Masahiko Sawada > wrote: > >> > >> > >> Rebased. > > > > > > I started reviewing the patch, I didn't finish my review yet. > > Following

Re: [HACKERS] Block level parallel vacuum

2019-01-18 Thread Masahiko Sawada
On Fri, Jan 18, 2019 at 10:38 AM Haribabu Kommi wrote: > > > On Tue, Jan 15, 2019 at 6:00 PM Masahiko Sawada wrote: >> >> >> Rebased. > > > I started reviewing the patch, I didn't finish my review yet. > Following are some of the comments. Thank you for reviewing the patch. > > +PARALLEL c

Re: [HACKERS] Block level parallel vacuum

2019-01-17 Thread Haribabu Kommi
On Tue, Jan 15, 2019 at 6:00 PM Masahiko Sawada wrote: > > Rebased. > I started reviewing the patch, I didn't finish my review yet. Following are some of the comments. +PARALLEL N + + + Execute index vacuum and cleanup index in parallel with I doubt that user can understand t

Re: [HACKERS] Block level parallel vacuum

2019-01-14 Thread Masahiko Sawada
On Fri, Dec 28, 2018 at 11:43 AM Masahiko Sawada wrote: > > On Thu, Dec 20, 2018 at 3:38 PM Amit Kapila wrote: > > > > On Tue, Dec 18, 2018 at 1:29 PM Masahiko Sawada > > wrote: > > > > > > Attached the updated patches. I scaled back the scope of this patch. > > > The patch now includes only fe

Re: [HACKERS] Block level parallel vacuum

2018-12-27 Thread Masahiko Sawada
On Thu, Dec 20, 2018 at 3:38 PM Amit Kapila wrote: > > On Tue, Dec 18, 2018 at 1:29 PM Masahiko Sawada wrote: > > > > Attached the updated patches. I scaled back the scope of this patch. > > The patch now includes only feature (a), that is it execute both index > > vacuum and cleanup index in par

Re: [HACKERS] Block level parallel vacuum

2018-12-19 Thread Amit Kapila
On Tue, Dec 18, 2018 at 1:29 PM Masahiko Sawada wrote: > > Attached the updated patches. I scaled back the scope of this patch. > The patch now includes only feature (a), that is it execute both index > vacuum and cleanup index in parallel. It also doesn't include > autovacuum support for now. > >

Re: [HACKERS] Block level parallel vacuum

2018-12-18 Thread Masahiko Sawada
On Tue, Nov 27, 2018 at 11:26 AM Amit Kapila wrote: > > On Mon, Nov 26, 2018 at 2:08 PM Masahiko Sawada wrote: > > > > On Sun, Nov 25, 2018 at 2:35 PM Amit Kapila wrote: > > > > > > On Sat, Nov 24, 2018 at 5:47 PM Amit Kapila > > > wrote: > > > > On Tue, Oct 30, 2018 at 2:04 PM Masahiko Sawada

Re: [HACKERS] Block level parallel vacuum

2018-11-26 Thread Amit Kapila
On Mon, Nov 26, 2018 at 2:08 PM Masahiko Sawada wrote: > > On Sun, Nov 25, 2018 at 2:35 PM Amit Kapila wrote: > > > > On Sat, Nov 24, 2018 at 5:47 PM Amit Kapila wrote: > > > On Tue, Oct 30, 2018 at 2:04 PM Masahiko Sawada > > > wrote: > > > > > > > > > Thank you for the comment. > > > > I cou

Re: [HACKERS] Block level parallel vacuum

2018-11-26 Thread Masahiko Sawada
On Sun, Nov 25, 2018 at 2:35 PM Amit Kapila wrote: > > On Sat, Nov 24, 2018 at 5:47 PM Amit Kapila wrote: > > On Tue, Oct 30, 2018 at 2:04 PM Masahiko Sawada > > wrote: > > > > > Thank you for the comment. > > I could see that you have put a lot of effort on this patch and still > > we are no

Re: [HACKERS] Block level parallel vacuum

2018-11-24 Thread Amit Kapila
On Sat, Nov 24, 2018 at 5:47 PM Amit Kapila wrote: > On Tue, Oct 30, 2018 at 2:04 PM Masahiko Sawada wrote: > > > > I could see that you have put a lot of effort on this patch and still > we are not able to make much progress mainly I guess because of > relation extension lock problem. I think w

Re: [HACKERS] Block level parallel vacuum

2018-11-24 Thread Amit Kapila
On Tue, Oct 30, 2018 at 2:04 PM Masahiko Sawada wrote: > > Attached rebased version patch to the current HEAD. > > > Please apply this patch with the extension lock patch[1] when testing > > as this patch can try to extend visibility map pages concurrently. > > > > Because the patch leads performa

Re: [HACKERS] Block level parallel vacuum

2018-11-02 Thread Masahiko Sawada
Hi, On Thu, Nov 1, 2018 at 2:28 PM Yura Sokolov wrote: > > Excuse me for being noisy. > > Increasing vacuum's ring buffer improves vacuum upto 6 times. > https://www.postgresql.org/message-id/flat/20170720190405.GM1769%40tamriel.snowman.net > This is one-line change. > > How much improvement para

Re: [HACKERS] Block level parallel vacuum

2018-10-31 Thread Yura Sokolov
Excuse me for being noisy. Increasing vacuum's ring buffer improves vacuum upto 6 times. https://www.postgresql.org/message-id/flat/20170720190405.GM1769%40tamriel.snowman.net This is one-line change. How much improvement parallel vacuum gives? 31.10.2018 3:23, Masahiko Sawada пишет: > On Tue, O

Re: [HACKERS] Block level parallel vacuum

2018-10-30 Thread Masahiko Sawada
On Tue, Aug 14, 2018 at 9:31 AM Masahiko Sawada wrote: > > On Thu, Nov 30, 2017 at 11:09 AM, Michael Paquier > wrote: > > On Tue, Oct 24, 2017 at 5:54 AM, Masahiko Sawada > > wrote: > >> Yeah, I was thinking the commit is relevant with this issue but as > >> Amit mentioned this error is emitted

Re: [HACKERS] Block level parallel vacuum WIP

2017-11-29 Thread Michael Paquier
On Tue, Oct 24, 2017 at 5:54 AM, Masahiko Sawada wrote: > Yeah, I was thinking the commit is relevant with this issue but as > Amit mentioned this error is emitted by DROP SCHEMA CASCASE. > I don't find out the cause of this issue yet. With the previous > version patch, autovacuum workers were wok

<    1   2   3   4