Re: Avoiding inadvertent debugging mode for pgbench
От | Euler Taveira |
---|---|
Тема | Re: Avoiding inadvertent debugging mode for pgbench |
Дата | |
Msg-id | 9949c694-1fdf-4571-ae88-4285560322a9@app.fastmail.com обсуждение исходный текст |
Ответ на | Re: Avoiding inadvertent debugging mode for pgbench (Tomas Vondra <tomas.vondra@enterprisedb.com>) |
Ответы |
Re: Avoiding inadvertent debugging mode for pgbench
|
Список | pgsql-hackers |
On Fri, Mar 1, 2024, at 8:07 PM, Tomas Vondra wrote:
On 3/1/24 23:41, Nathan Bossart wrote:>> I think this is a generally reasonable proposal, except I don't know> whether this breakage is acceptable. AFAICT there are two fundamental> behavior changes folks would observe:>> * "-d <database_name>" would cease to emit the debugging output, and while> enabling debug mode might've been unintentional in most cases, it might> actually have been intentional in others.>I think this is the more severe of the two issues, because it's a silentchange. Everything will seem to work, but the user won't get the debuginfo (if they actually wanted it).
Indeed. Hopefully the user will notice soon when inspecting the standard error
output.
> * "-d" with no argument or with a following option would begin failing, and> users would need to replace "-d" with "--debug".>I think this is fine.
Yeah. It will force the user to fix it immediately.
> Neither of these seems particularly severe to me, especially for a> benchmarking program, but I'd be curious to hear what others think.>I agree the -d option may be confusing, but is it worth it? I don'tknow, it depends on how often people actually get confused by it, and Idon't recall hitting this (nor hearing about others). To be honest Ididn't even realize pgbench even has a debug switch ...
I'm the one that has a habit to use -d to specify the database name. I
generally include -d for pgbench and then realized that I don't need the debug
information because it is not for database specification.
But I'd like to mention this is far from our only tool using "-d" toenable debug mode. A quick git-grep shows postgres, initdb,pg_archivecleanup and pg_combinebackup do the same thing. So maybe it'snot that inconsistent overall.
As Greg said none of these programs connects to the database.
I don't like to break backward compatibility but in this case I suspect that it
is ok. I don't recall the last time I saw a script that makes use of -d option.
How often do you need a pgbench debug information?
В списке pgsql-hackers по дате отправления: