Re: Inconsistent style in pgbench's error messages

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Inconsistent style in pgbench's error messages
Дата
Msg-id alpine.DEB.2.10.1507060624230.7427@sto
обсуждение исходный текст
Ответ на Inconsistent style in pgbench's error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Inconsistent style in pgbench's error messages  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello Tom,

> Personally I think "pgbench: " adds very little and so I'd rather get 
> rid of it, but I'm sure others feel differently.

I think that one of the reason for this is that once pgbench started to 
run it is desirable to differentiate error messages that come from libpq 
and those that come from pgbench itsef.

Although for some messages this may be obvious, this may not always be the 
case.

For instance "invalid variable name", such a message may come from a 
plpgsql function invoked.

Example from psql with a prefix:
  sh> psql -p 12345678  psql: invalid port number: "12345678"

> Another issue here is that when dealing with custom scripts, IMO it 
> would be really helpful to provide the file name, line number, and 
> perhaps line text whenever a message is about an identifiable command. 
> That's mostly not happening at present, except for the aforesaid 
> inconsistent mentions of metacommand names.  To make that happen, we'd 
> need to agree on a formatting convention for attaching the info.  I'd be 
> inclined to put it on a separate line, but beyond that have no specific 
> thoughts.

Just to bootstap something, say:
  pgbench "test.sql": error message...

Then maybe:
  LINE 3: content of the line if available...

I'm not sure that the line contents would necessarily be available, it may 
have been tokenized in some cases, if so it may have to be kept around.

I'm not sure how to deal with "internal" scripts. Maybe:
  pgbench "TPC-B (sort-of)": ...

-- 
Fabien.



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Let PostgreSQL's On Schedule checkpoint write buffer smooth spread cycle by tuning IsCheckpointOnSchedule?
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: pg_archivecleanup, and backup filename to specify as an argument