Avoiding inadvertent debugging mode for pgbench

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Avoiding inadvertent debugging mode for pgbench
Дата
Msg-id CAKAnmmLjAzwVtb=VEaeuCtnmOLpzkJ1uJ_XiQ362YdD9B72HSg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Avoiding inadvertent debugging mode for pgbench  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
Attached please find a patch to adjust the behavior of the pgbench program and make it behave like the other programs that connect to a database (namely, psql and pg_dump). Specifically, add support for using -d and --dbname to specify the name of the database. This means that -d can no longer be used to turn on debugging mode, and the long option --debug must be used instead.

This removes a long-standing footgun, in which people assume that the -d option behaves the same as other programs. Indeed, because it takes no arguments, and because the first non-option argument is the database name, it still appears to work. However, people then wonder why pgbench is so darn verbose all the time! :)

This is a breaking change, but fixing it this way seems to have the least total impact, as the number of people using the debug mode of pgbench is likely quite small. Further, those already using the long option are unaffected, and those using the short one simply need to replace '-d' with '--debug', arguably making their scripts a little more self-documenting in the process.

Cheers,
Greg

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: [PoC] Federated Authn/z with OAUTHBEARER
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: [PoC] Federated Authn/z with OAUTHBEARER