You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified and yes this is a bug that impacts the PostgreSQL TPROC-H driver script only on Windows. So as you rightly identify there is an additional sslmode in the connect string between port = $port that should not be there.
if {$tcl_platform(platform) == "windows"} {
#Workaround for Bug #95 where first connection fails on Windows
catch {pg_disconnect $lda}
set lda [pg_connect -conninfo [list host = $host port sslmode = $port sslmode = $sslmode user = $user password = $password dbname = $dbname ]]
}
and this results in the error
Error in Virtual User 1: Connection to database failed
missing "=" after "port" in connection info string
when trying to run the driver script.
As a workaround, you can delete the additional sslmode word highlight above.
However, this additional section was itself also added as a bug workaround and testing on PostgreSQL 12 for windows shows it is no longer required. (The first connection attempt will have succeeded and then disconnected to get to this point) Therefore a pull request will be made to remove this entire section for both TPROC-C and H.
proc ConnectToPostgres { host port sslmode user password dbname } {
global tcl_platform
if {[catch {set lda [pg_connect -conninfo [list host = $host port = $port sslmode = $sslmode user = $user password = $password dbname = $dbname ]]} message]} {
set lda "Failed" ; puts $message
error $message
} else {
pg_notice_handler $lda puts
set result [ pg_exec $lda "set CLIENT_MIN_MESSAGES TO 'ERROR'" ]
pg_result $result -clear
}
return $lda
}
I see some potential bug, but it may not be one I am hitting…
You see ‘port sslmode = $port’, the sslmode should not be there…
In pgolap.tcl,
785 } else {
786 if {$tcl_platform(platform) == "windows"} {
787 #Workaround for Bug #95 where first connection fails on Windows
788 catch {pg_disconnect $lda}
789 set lda [pg_connect -conninfo [list host = $host port sslmode = $port sslmode = $sslmode user = $user password = $password dbname = $dbname ]]
Here are the steps…
dbset db pg
dbset bm TPC-H
loadscript
vucreate
vurun
HammerDB CLI v4.5
Copyright (C) 2003-2022 Steve Shaw
Type "help" for a list of commands
hammerdb>
Database set to PostgreSQL
hammerdb>dbset bm TPC-H
Benchmark set to TPC-H for PostgreSQL
hammerdb>loadscript
TPROC-H Driver Script
Script loaded, Type "print script" to view
hammerdb>vucreate
Vuser 1 created - WAIT IDLE
1 Virtual Users Created
hammerdb>vurun
Vuser 1:RUNNING
Error in Virtual User 1: Connection to database failed
missing "=" after "port" in connection info string
The text was updated successfully, but these errors were encountered: