| From: | Stephen Frost <sfrost(at)snowman(dot)net> |
|---|---|
| To: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
| Cc: | Andrey Borodin <amborodin86(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: psql \watch 2nd argument: iteration count |
| Date: | 2023-02-20 14:40:18 |
| Message-ID: | Y/OGUo+nTiCkustL@tamriel.snowman.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greetings,
* Peter Eisentraut (peter(dot)eisentraut(at)enterprisedb(dot)com) wrote:
> On 17.02.23 00:33, Andrey Borodin wrote:
> > From time to time I want to collect some stats from locks, activity
> > and other stat views into one table from different time points. In
> > this case the \watch psql command is very handy. However, it's not
> > currently possible to specify the number of times a query is
> > performed.
>
> The watch command on my OS has a lot of options, but this is not one of
> them. So probably no one has really needed it so far.
watch doesn't ... but top does, and I can certainly see how our watch
having an iterations count could be helpful in much the same way as
top's batch mode does.
> > Also, if we do not provide a timespan, 2 seconds are selected. But if
> > we provide an incorrect argument - 1 second is selected.
> > PFA the patch that adds iteration count argument and makes timespan
> > argument more consistent.
>
> That should probably be fixed.
And should probably be independent patches.
Thanks,
Stephen
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Erik Rijkers | 2023-02-20 14:41:36 | Re: SQL/JSON revisited |
| Previous Message | Justin Pryzby | 2023-02-20 14:34:52 | Re: Add support for unit "B" to pg_size_pretty() |