Re: BUG #12379: pgbench should hint to pgbench -i - Mailing list pgsql-bugs

From Fabien COELHO
Subject Re: BUG #12379: pgbench should hint to pgbench -i
Date
Msg-id alpine.DEB.2.10.1507060709030.7427@sto
Whole thread Raw
In response to Re: BUG #12379: pgbench should hint to pgbench -i  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #12379: pgbench should hint to pgbench -i
List pgsql-bugs
> I looked at this a bit and have a few comments:
>
> * I think it might be best to restrict the hint to appear only in the
> case that the SQLSTATE is ERRCODE_UNDEFINED_TABLE.  There are a lot of
> possible failures here, and I'm not sure this hint is apropos for any
> but that one.

Hmmm... the likelyhood of another kind of error is small on:

    "select count(*) from pgbench_branches;"

I think the only other possibility would be a permission issue.

> * I really don't care for "HINT pgbench: " as that's got pretty much
> nothing to do with any other message formatting we have anywhere,
> least of all the existing hint-like messages in pgbench.

It is kind of a copy of postgres hints, but not more than that:

   HINT:  Consider increasing the configuration parameter "max_wal_size"

> I've started a different thread at
> http://www.postgresql.org/message-id/22280.1436139973@sss.pgh.pa.us to
> discuss what the general message formatting in pgbench ought to be, and
> probably this needs to wait for the outcome of that discussion.

Yep.

> * I'd be a bit inclined to reduce the message to something like
>    Perhaps you need to do initialization ("pgbench -i") in database "foo"
> so that we can avoid the question of formatting of multi-sentence hints.

Why not. This sentence hints at one possible error instead of two, though,
but it may be enough.

--
Fabien.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13486: How can I sort unnest results?
Next
From: Roberto Morelli
Date:
Subject: Re: BUG #13485: JSONB To recordset not working with CamelCase