psql \watch 2nd argument: iteration count

From: Andrey Borodin <amborodin86(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: psql \watch 2nd argument: iteration count
Date: 2023-02-16 23:33:07
Message-ID: CAAhFRxiZ2-n_L1ErMm9AZjgmUK=qS6VHb+0SaMn8sqqbhF7How@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers!

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.
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.
What do you think?

Best regards, Andrey Borodin.

Attachment Content-Type Size
0001-Add-iteration-count-argument-to-psql-watch-command.patch application/octet-stream 4.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2023-02-17 00:08:21 Re: [PATCH] Add pretty-printed XML output option
Previous Message Tom Lane 2023-02-16 22:40:22 Re: ATTACH PARTITION seems to ignore column generation status