I tested your version of odbc-link on both PostgreSQL 9.3 and 9.5 and I am getting a Segmentation fault
on odbclink.connect
.
apt-get update
apt-get -y install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
apt-get update
apt-get -y install postgresql-9.3 postgresql-server-dev-9.3
root@ip-10-0-1-134:~# su postgres
postgres@ip-10-0-1-134:~$ psql
psql (9.3.19)
Type "help" for help.
postgres=# \c test
You are now connected to database "test" as user "postgres".
test=# select odbclink.connect('dsn', 'username', 'password');
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
!>
!>
2017-09-22 14:01:59.055 EDT [1570] LOG: server process (PID 14339) was terminated by signal 11: Segmentation fault
2017-09-22 14:01:59.055 EDT [1570] DETAIL: Failed process was running: select odbclink.connect('dsn', 'username', 'password');
2017-09-22 14:01:59.055 EDT [1570] LOG: terminating any other active server processes
2017-09-22 14:01:59.057 EDT [14328] WARNING: terminating connection because of crash of another server process
2017-09-22 14:01:59.057 EDT [14328] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2017-09-22 14:01:59.057 EDT [14328] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2017-09-22 14:01:59.059 EDT [1570] LOG: all server processes terminated; reinitializing
2017-09-22 14:01:59.068 EDT [14342] postgres@test FATAL: the database system is in recovery mode
2017-09-22 14:01:59.069 EDT [14341] LOG: database system was interrupted; last known up at 2017-09-22 14:01:32 EDT
2017-09-22 14:01:59.078 EDT [14341] LOG: database system was not properly shut down; automatic recovery in progress
2017-09-22 14:01:59.080 EDT [14341] LOG: record with zero length at 0/17A5AC0
2017-09-22 14:01:59.080 EDT [14341] LOG: redo is not required
2017-09-22 14:01:59.101 EDT [14341] LOG: MultiXact member wraparound protections are now enabled
2017-09-22 14:01:59.103 EDT [1570] LOG: database system is ready to accept connections
2017-09-22 14:01:59.104 EDT [14346] LOG: autovacuum launcher started
I tried initially with PG 9.5 and got the same issue. I tried with 9.3 thinking that it might be a compatibility issue with newer versions of PG.
Are you still maintaining odbc-link? Is it an issue you would be able to look into?