Re: adding status for COPY progress report

2022-05-31 Thread Zhihong Yu
On Tue, May 31, 2022 at 1:20 AM Amit Langote wrote: > Hi, > > On Thu, May 26, 2022 at 11:35 AM Zhihong Yu wrote: > >> The changes in pgstat_progress_end_command() and > >> pg_stat_get_progress_info() update st_progress_command_target > >> depending on the command type involved, breaking the exis

Re: adding status for COPY progress report

2022-05-31 Thread Amit Langote
Hi, On Thu, May 26, 2022 at 11:35 AM Zhihong Yu wrote: >> The changes in pgstat_progress_end_command() and >> pg_stat_get_progress_info() update st_progress_command_target >> depending on the command type involved, breaking the existing contract >> of those routines, particularly the fact that t

Re: adding status for COPY progress report

2022-05-25 Thread Zhihong Yu
On Wed, May 25, 2022 at 5:51 PM Michael Paquier wrote: > On Wed, May 25, 2022 at 09:34:51AM -0700, Zhihong Yu wrote: > > Let's look at the sequences of user activity for long running COPY > command. > > The user would likely issue queries to pg_stat_progress_copy over time. > > Let's say on Nth i

Re: adding status for COPY progress report

2022-05-25 Thread Michael Paquier
On Wed, May 25, 2022 at 09:34:51AM -0700, Zhihong Yu wrote: > Let's look at the sequences of user activity for long running COPY command. > The user would likely issue queries to pg_stat_progress_copy over time. > Let's say on Nth invocation, the user sees X tuples copied. > On (N+1)st invocation,

Re: adding status for COPY progress report

2022-05-25 Thread Zhihong Yu
On Wed, May 25, 2022 at 8:20 AM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Wed, 25 May 2022 at 16:32, Zhihong Yu wrote: > > > > On Wed, May 25, 2022 at 3:55 AM Matthias van de Meent < > boekewurm+postg...@gmail.com> wrote: > >> > >> On Wed, 25 May 2022 at 10:15, Zhihong Yu

Re: adding status for COPY progress report

2022-05-25 Thread Matthias van de Meent
On Wed, 25 May 2022 at 16:32, Zhihong Yu wrote: > > On Wed, May 25, 2022 at 3:55 AM Matthias van de Meent > wrote: >> >> On Wed, 25 May 2022 at 10:15, Zhihong Yu wrote: >> > >> > Hi, >> > Patch v3 follows advice from Matthias (status field has been dropped). >> >> Could you argue why you think

Re: adding status for COPY progress report

2022-05-25 Thread Zhihong Yu
On Wed, May 25, 2022 at 3:55 AM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Wed, 25 May 2022 at 10:15, Zhihong Yu wrote: > > > > Hi, > > Patch v3 follows advice from Matthias (status field has been dropped). > > Could you argue why you think that this should be added to the

Re: adding status for COPY progress report

2022-05-25 Thread Matthias van de Meent
On Wed, 25 May 2022 at 10:15, Zhihong Yu wrote: > > Hi, > Patch v3 follows advice from Matthias (status field has been dropped). Could you argue why you think that this should be added to the pg_stat_progress_copy view? Again, the progress reporting subsystem is built to "report the progress of c

Re: adding status for COPY progress report

2022-05-25 Thread Zhihong Yu
On Tue, May 24, 2022 at 3:02 PM Zhihong Yu wrote: > > > On Tue, May 24, 2022 at 2:12 PM Matthias van de Meent < > boekewurm+postg...@gmail.com> wrote: > >> On Tue, 24 May 2022 at 22:12, Zhihong Yu wrote: >> > >> > On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent < >> boekewurm+postg...@gma

Re: adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
On Tue, May 24, 2022 at 2:12 PM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Tue, 24 May 2022 at 22:12, Zhihong Yu wrote: > > > > On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent < > boekewurm+postg...@gmail.com> wrote: > >> > >> On Tue, 24 May 2022 at 19:13, Zhihong Yu

Re: adding status for COPY progress report

2022-05-24 Thread Matthias van de Meent
On Tue, 24 May 2022 at 22:12, Zhihong Yu wrote: > > On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent > wrote: >> >> On Tue, 24 May 2022 at 19:13, Zhihong Yu wrote: >> > >> > Hi, >> > Please see attached for enhancement to COPY command progress. >> > >> > The added status column would allo

Re: adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
On Tue, May 24, 2022 at 12:37 PM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Tue, 24 May 2022 at 19:13, Zhihong Yu wrote: > > > > Hi, > > Please see attached for enhancement to COPY command progress. > > > > The added status column would allow users to get the status of the

Re: adding status for COPY progress report

2022-05-24 Thread Matthias van de Meent
On Tue, 24 May 2022 at 19:13, Zhihong Yu wrote: > > Hi, > Please see attached for enhancement to COPY command progress. > > The added status column would allow users to get the status of the most > recent COPY command. I fail to see the merit of retaining completed progress reporting commands in

Re: adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
Hi, Here is the updated patch. Cheers On Tue, May 24, 2022 at 10:18 AM Zhihong Yu wrote: > Hi, > Please see attached for enhancement to COPY command progress. > > The added status column would allow users to get the status of the most > recent COPY command. > > Below is sample output. > > Thank

adding status for COPY progress report

2022-05-24 Thread Zhihong Yu
Hi, Please see attached for enhancement to COPY command progress. The added status column would allow users to get the status of the most recent COPY command. Below is sample output. Thanks yugabyte=# SELECT relid::regclass, command, status, yugabyte-# type, bytes_processed, bytes_tot