Re: parallel vacuum - few questions on docs, comments and code

2021-05-25 Thread Amit Kapila
On Fri, May 21, 2021 at 3:33 PM Amit Kapila wrote: > > On Fri, May 21, 2021 at 1:30 PM Bharath Rupireddy > wrote: > > > > On Fri, May 21, 2021 at 11:10 AM Amit Kapila > > wrote: > > > > > > If the patch changes the vacuumdb code as above then isn't it better > > > to change the vacuumdb docs to

Re: parallel vacuum - few questions on docs, comments and code

2021-05-21 Thread Amit Kapila
On Fri, May 21, 2021 at 1:30 PM Bharath Rupireddy wrote: > > On Fri, May 21, 2021 at 11:10 AM Amit Kapila wrote: > > > > If the patch changes the vacuumdb code as above then isn't it better > > to change the vacuumdb docs to reflect the same. See below part of > > vacuumdb docs: > > -P parallel_d

Re: parallel vacuum - few questions on docs, comments and code

2021-05-21 Thread Bharath Rupireddy
On Fri, May 21, 2021 at 11:10 AM Amit Kapila wrote: > I responded on that thread and it seems there is no object to the new > message. I have a minor comment on your patch: Thanks Amit! > - printf(_(" -P, --parallel=PARALLEL_DEGREE use this many background > workers for vacuum, if available\n"

Re: parallel vacuum - few questions on docs, comments and code

2021-05-20 Thread Amit Kapila
On Fri, May 14, 2021 at 6:00 PM Bharath Rupireddy wrote: > > On Fri, May 14, 2021 at 10:43 AM Dilip Kumar wrote: > > > > > > Your changes look good. About changing the "non-negative integer" to > > "greater than or equal to zero", there is another thread [1], I am not > > sure that have we concl

Re: parallel vacuum - few questions on docs, comments and code

2021-05-14 Thread Bharath Rupireddy
On Fri, May 14, 2021 at 10:43 AM Dilip Kumar wrote: > > On Thu, May 13, 2021 at 9:00 PM Bharath Rupireddy > wrote: > > > > Done that way. > > > > PSA patch. > > Your changes look good. About changing the "non-negative integer" to > "greater than or equal to zero", there is another thread [1], I

Re: parallel vacuum - few questions on docs, comments and code

2021-05-13 Thread Dilip Kumar
On Thu, May 13, 2021 at 9:00 PM Bharath Rupireddy wrote: > > Done that way. > > PSA patch. Your changes look good. About changing the "non-negative integer" to "greater than or equal to zero", there is another thread [1], I am not sure that have we concluded anything there yet. - pg_log_error("

Re: parallel vacuum - few questions on docs, comments and code

2021-05-13 Thread Bharath Rupireddy
On Thu, May 13, 2021 at 7:00 PM Masahiko Sawada wrote: > > > Yeah, I get it. Even if users don't specify a parallel option there > > > are chances that parallelism is picked. So the parallel degree is the > > > final number of workers that are chosen by the server for vacuuming > > > indexes. And,

Re: parallel vacuum - few questions on docs, comments and code

2021-05-13 Thread Masahiko Sawada
On Thu, May 13, 2021 at 3:25 PM Amit Kapila wrote: > > On Wed, May 12, 2021 at 6:37 PM Bharath Rupireddy > wrote: > > > > On Wed, May 12, 2021 at 11:10 AM Amit Kapila > > wrote: > > > > > > On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy > > > wrote: > > > > > > > > I was going through the p

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Amit Kapila
On Wed, May 12, 2021 at 6:30 PM Bharath Rupireddy wrote: > > On Wed, May 12, 2021 at 9:48 AM Amit Kapila wrote: > > > > On Tue, May 11, 2021 at 6:31 PM Justin Pryzby wrote: > > > > > > On Tue, May 11, 2021 at 05:37:50PM +0530, Bharath Rupireddy wrote: > > > > 3) Should the Assert(nindexes > 0);

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Amit Kapila
On Wed, May 12, 2021 at 6:37 PM Bharath Rupireddy wrote: > > On Wed, May 12, 2021 at 11:10 AM Amit Kapila wrote: > > > > On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy > > wrote: > > > > > > I was going through the parallel vacuum docs and code. I found below > > > things, please someone clar

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Bharath Rupireddy
On Wed, May 12, 2021 at 11:10 AM Amit Kapila wrote: > > On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy > wrote: > > > > I was going through the parallel vacuum docs and code. I found below > > things, please someone clarify: > > > > 1) I see that a term "parallel degree" is used in the docs,

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Bharath Rupireddy
On Wed, May 12, 2021 at 9:48 AM Amit Kapila wrote: > > On Tue, May 11, 2021 at 6:31 PM Justin Pryzby wrote: > > > > On Tue, May 11, 2021 at 05:37:50PM +0530, Bharath Rupireddy wrote: > > > 3) Should the Assert(nindexes > 0); in begin_parallel_vacuum just be > > > Assert(nindexes > 1); as this fun

Re: parallel vacuum - few questions on docs, comments and code

2021-05-12 Thread Bharath Rupireddy
On Tue, May 11, 2021 at 6:31 PM Justin Pryzby wrote: > > 4) IIUC, below comment says that even if PARALLEL 0 is specified with > > VACUUM command, there are chances that the indexes are vacuumed in > > parallel. Isn't it a bit unusual that a user specified 0 workers but > > still the system is pic

Re: parallel vacuum - few questions on docs, comments and code

2021-05-11 Thread Amit Kapila
On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy wrote: > > I was going through the parallel vacuum docs and code. I found below > things, please someone clarify: > > 1) I see that a term "parallel degree" is used in the docs, code > comments, error messages "parallel vacuum degree must be a > n

Re: parallel vacuum - few questions on docs, comments and code

2021-05-11 Thread Dilip Kumar
On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy wrote: > > Hi, > > I was going through the parallel vacuum docs and code. I found below > things, please someone clarify: > > 1) I see that a term "parallel degree" is used in the docs, code > comments, error messages "parallel vacuum degree must

Re: parallel vacuum - few questions on docs, comments and code

2021-05-11 Thread Amit Kapila
On Tue, May 11, 2021 at 6:31 PM Justin Pryzby wrote: > > On Tue, May 11, 2021 at 05:37:50PM +0530, Bharath Rupireddy wrote: > > 3) Should the Assert(nindexes > 0); in begin_parallel_vacuum just be > > Assert(nindexes > 1); as this function is entered only when indexes > > are > 1? > > I think you'

Re: parallel vacuum - few questions on docs, comments and code

2021-05-11 Thread Justin Pryzby
On Tue, May 11, 2021 at 05:37:50PM +0530, Bharath Rupireddy wrote: > 3) Should the Assert(nindexes > 0); in begin_parallel_vacuum just be > Assert(nindexes > 1); as this function is entered only when indexes > are > 1? I think you're right, at least with the current implementation that paralleliza

parallel vacuum - few questions on docs, comments and code

2021-05-11 Thread Bharath Rupireddy
Hi, I was going through the parallel vacuum docs and code. I found below things, please someone clarify: 1) I see that a term "parallel degree" is used in the docs, code comments, error messages "parallel vacuum degree must be a non-negative integer", "parallel vacuum degree must be between 0 an