Checking Postgresqul library from hammerDB

346 views Asked by At

We are trying to test postgresql from hammer db, getting below error when I run the librarycheck in in hammerdbcli. I'm using hammerdb version4.1 in RHEL7.9

Checking database library for PostgreSQL
Error: failed to load Pgtcl - couldn't load file "/root/HammerDB-4.1/lib/pgtcl2.1.1/libpgtcl2.1.1.so": /root/HammerDB-4.1/lib/pgtcl2.1.1/libpgtcl2.1.1.so: undefined symbol: lo_truncate64
Ensure that PostgreSQL client libraries are installed and the location in the LD_LIBRARY_PATH environment variable
1

There are 1 answers

0
user131743 On BEST ANSWER

The HammerDB Documentation section can help here under the section "Verifying the Installation of Database Client Libraries".

On Linux use the ldd command to determine which PostgreSQL libraries are in your path. In this example libpq from a PostgreSQL 14 installation is found and librarycheck runs successfully.

$ ldd libpgtcl2.1.1.so 
    linux-vdso.so.1 (0x00007ffc621ff000)
    libpq.so.5 => /opt/postgresql-14.1/lib/libpq.so.5 (0x00007f34c2e69000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f34c2c5d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f34c2c3a000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f34c30c8000)

$ ./hammerdbcli 
HammerDB CLI v4.4
Copyright (C) 2003-2022 Steve Shaw
Type "help" for a list of commands
The xml is well-formed, applying configuration
hammerdb>librarycheck
...
Checking database library for PostgreSQL
Success ... loaded library Pgtcl for PostgreSQL
...

It is likely that you are finding a library earlier than version 9.3 where lo_truncate64 was introduced so ensure that the LD_LIBRARY_PATH is set to a PostgreSQL library from a version that is listed in the HammerDB Test Matrix.