I am getting error like "pgbench: fatal: could not count number of branches: ERROR: relation "pgbench_branches" does not exist" when i ran the commmand "pgbench -c 20 -t 1000 -C -f d:\test_postgres\script.sql -p 5432 -U postgres -S Shiftlog" in windows command prompt.

-c is number of current clients
-t number of transactions per clients
-C Close the connection afer every transaction
-f run/execute the specified file
-p Port number of postgre instance
-S Database name in the postgre instance

I haven't stored the pgbench tables in my db(i.e. Shiftlog). Because i don't know the process to get these tables in windows postgres environment. Even though i specified the script file why pgbench is using the TPC-B file for the excurtion?.

D:\test_postgres>pgbench -c 20 -t 1000 -C -f d:\test_postgres\script.sql -p 5432 -U postgres -S Shiftlog
Password:
pgbench (14.5)
pgbench: fatal: could not count number of branches: ERROR:  relation "pgbench_branches" does not exist
LINE 1: select count(*) from pgbench_branches
                             ^
pgbench: Perhaps you need to do initialization ("pgbench -i") in database "Shiftlog"

D:\test_postgres>

Could you please help me to resolve this problem. Thank you so much for your support. Please check below image for the commands of sql script file.

enter image description here

0

There are 0 best solutions below