Peter Krauss
Peter Krauss

Reputation: 13940

How to call pg_test_timing in Ubuntu?

The pg_test_timing command is cited as relevant caveat and have some documentation... But documentaion not say how to call it.

root@machine:~# pg_test_timing
pg_test_timing: command not found

Why PostgreSQL official distribution not offers it automatically?

dump locate

locate pg_test_timing
/etc/alternatives/pg_test_timing.1.gz
/usr/lib/postgresql/10/bin/pg_test_timing
/usr/share/locale/de/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/locale/es/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/locale/fr/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/locale/ko/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/locale/pl/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/locale/ru/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/locale/sv/LC_MESSAGES/pg_test_timing-10.mo
/usr/share/man/man1/pg_test_timing.1.gz
/usr/share/postgresql/10/man/man1/pg_test_timing.1.gz

Upvotes: 1

Views: 817

Answers (1)

Vao Tsun
Vao Tsun

Reputation: 51609

There's a quote nn "Getting Started" section of docs: https://www.postgresql.org/docs/current/static/tutorial-createdb.html

If you see a message similar to:

createdb: command not found

then PostgreSQL was not installed properly. Either it was not installed at all or your shell's search path was not set to include it. Try calling the command with an absolute path instead:

$ /usr/local/pgsql/bin/createdb mydb

(formatting mine)

Please use this advise against other binaries as well.

Either add /usr/lib/postgresql/10/bin/ to your $PATH or use the full path to binaries folder...

Also, please note, this is rather not a problem of "PostgresSQL official distribution", but rather a installer you use for the distribution of Linux you are on...

also it is mentioned in docs if you build it from source *which would be more suitable for the title of official distribution):

https://www.postgresql.org/docs/10/static/install-post.html

If you installed into /usr/local/pgsql or some other location that is not searched for programs by default, you should add /usr/local/pgsql/bin (or whatever you set --bindir to in Step 1) into your PATH.

Upvotes: 3

Related Questions