Re: psql \watch 2nd argument: iteration count - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: psql \watch 2nd argument: iteration count
Date
Msg-id 8f133e7d-0803-9280-78ba-19d2db796176@enterprisedb.com
Whole thread Raw
In response to psql \watch 2nd argument: iteration count  (Andrey Borodin <amborodin86@gmail.com>)
Responses Re: psql \watch 2nd argument: iteration count
List pgsql-hackers
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.

> 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.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: some namespace.c refactoring
Next
From: Bharath Rupireddy
Date:
Subject: Re: Add WAL read stats to pg_stat_wal