Thread

Commits

  1. doc: Mention PGDATABASE as supported by pgbench

  1. pgbench: supports PGDATABASE / warning about -d

    The Post Office <noreply@postgresql.org> — 2021-02-22T11:39:46Z

    The following documentation comment has been logged on the website:
    
    Page: https://www.postgresql.org/docs/13/legalnotice.html
    Description:
    
    1) pgbench has always supported the PGDATABASE env variable, but it is not
    listed along PGHOST/PGPORT & PGUSER  in 
    https://www.postgresql.org/docs/13/pgbench.html#id-1.9.4.10.8.
    PGDATABASE is listed in the pages of the psql/pg_dump/createdb...
    utilities
    
    2) In "Common options", it would be useful to add a warning that "-d means
    --debug and does NOT define the database, contrary to most other PostgreSQL
    utilities". 
    (It seems to work and the consequence is a flood of SQL orders on the
    screen.)
    
  2. Re: pgbench: supports PGDATABASE / warning about -d

    Michael Paquier <michael@paquier.xyz> — 2021-02-24T05:29:31Z

    On Mon, Feb 22, 2021 at 11:39:46AM +0000, PG Doc comments form wrote:
    > 1) pgbench has always supported the PGDATABASE env variable, but it is not
    > listed along PGHOST/PGPORT & PGUSER  in 
    > https://www.postgresql.org/docs/13/pgbench.html#id-1.9.4.10.8.
    > PGDATABASE is listed in the pages of the psql/pg_dump/createdb...
    > utilities
    
    Yeah, let's fix that.  Adding only PGDATABASE to the list of
    environment variables supported does not look enough to me, so I
    propose the simple patch attached to clarify what happens to dbname in
    more details.
    
    > 2) In "Common options", it would be useful to add a warning that "-d means
    > --debug and does NOT define the database, contrary to most other PostgreSQL
    > utilities". 
    > (It seems to work and the consequence is a flood of SQL orders on the
    > screen.)
    
    I don't agree with this part.
    --
    Michael
    
  3. Re: pgbench: supports PGDATABASE / warning about -d

    Michael Paquier <michael@paquier.xyz> — 2021-02-25T07:09:31Z

    On Wed, Feb 24, 2021 at 02:29:31PM +0900, Michael Paquier wrote:
    > Yeah, let's fix that.  Adding only PGDATABASE to the list of
    > environment variables supported does not look enough to me, so I
    > propose the simple patch attached to clarify what happens to dbname in
    > more details.
    
    Applied this one as of 9e9b5c0.  5aaa584 is the original change that
    updated the doc of pgbench to mention all the supported environment
    variable, so this has been backpatched down to 12.
    --
    Michael