Re: idea - custom menu

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: idea - custom menu
Date: 2018-03-27 00:44:49
Message-ID: CANNMO++X_Gk7GhY-nirjfEzYReV1sx0Eu6KdwL-jwAXMj7CKjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Mar 3, 2018 at 1:08 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:

> Hi
>

Hi Pavel, I don't know how I missed this email, but finally I found it :-)

> I am looking on project https://github.com/NikolayS/postgres_dba
>
> Nice idea, and perfect publicity of typical PostgreSQL maintenance task.
>

Thank you! It's in very early stage, I'm going to polish existing reports
and add more soon.

>
> We can allow to call some external applications on some key press (not
> command) and evaluate their output. mc has F2 for User menu. It can works
> well with pdmenu or some similar. Some simple menu can be done on we lines
> with ncurses.
>

> It can be substitution of some custom commands.
>
> Comments, notes?
>

This is a great idea. Adding more reports means that menu will be very
long. I considered having two layers of menu, but it will become less
convenient. First of all because of necessity to press <Enter> after typing
each command. If user could just press a single button combination, it
would make working with such thing much more convenient. I would also bind
some key to allow repeating the last report without going to the main menu
at all. Had a look at pdmenu – well, if it could be possible to use it for
postgres_dba, it would be awesome. Does it work with MacOS, by the way?

Also (different story), all new Postgres/psql users hate its output for
wide result sets. Making your pspg more "available" for end users would
help a lot here – is it possible to ship it with psql itself, at least as
an optional feature? I don't know anyone who likes default output of wide
tables in psql. The pspg is very underestimated.

And one more thing (also a different story completely): wouldn't it be good
to have ability to connect psql to remote Postgres over ssh tunnel just
with some option in psql? Currently, users need to setup an SSH tunnel with
"ssh" command first, and only then connect psql, but I see that for new
users, it's difficult to manage such thing, some of them end up opening
Postgres to the world (it was mentioned recently in some article that at
least 700k Postgres instances were found with port 5432 available for the
world, so ssh tunneling option would be great in psql).

And finally: several people asked me to use colors in reports, but it's not
possible currently in psql – I can use color output for "\echo" command
now, but I cannot do anything like that for the server's response. For
instance, it would be nice to make some numbers colored/bold if they are
above/below some threshold value, for specific column in the server's
output. It could be \filter command specifying the rules of the output's
post-processing. Can ncurses be useful for such thing?

Regards,
Nikolay

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-03-27 00:45:29 Re: Parallel Aggregates for string_agg and array_agg
Previous Message Haribabu Kommi 2018-03-27 00:43:27 Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types