Re: BUG #13786: ODBC driver doesn't work to connect to database

From: Terry Xie <txie(at)incognito(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13786: ODBC driver doesn't work to connect to database
Date: 2015-11-30 17:41:24
Message-ID: CAHR73U_OYVBZEabi0oGZdweK2JVAYD90db5JfPuxrMRnhNMABQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Forgot to answer, yes 09.03.0400 is the version number for odbc driver. The
latest from the 9.3 repo package.

On Mon, Nov 30, 2015 at 9:37 AM, Terry Xie <txie(at)incognito(dot)com> wrote:

> Hi Michael,
>
>
> *This is the debug log on the postgres when the connection happens. Also I attached the STRACE log below. If the bug report is not for the correct place, could you let me know the link to report pgsql odbc bug?*
>
>
> DEBUG: forked new backend, pid=20848 socket=8
>
> DEBUG: postmaster child[20848]: starting with (
> DEBUG: postgres
> DEBUG: )
> DEBUG: InitPostgres
> DEBUG: my backend id is 2
> DEBUG: StartTransaction
> DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
> DEBUG: CommitTransaction
> DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
> DEBUG: StartTransactionCommand
> DEBUG: StartTransaction
> DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
> DEBUG: CommitTransactionCommand
> DEBUG: CommitTransaction
> DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
> DEBUG: shmem_exit(0): 7 callbacks to make
> DEBUG: proc_exit(0): 3 callbacks to make
> DEBUG: exit(0)
> DEBUG: shmem_exit(-1): 0 callbacks to make
> DEBUG: proc_exit(-1): 0 callbacks to make
> DEBUG: reaping dead processes
> DEBUG: server process (PID 20848) exited with exit code 0
>
>
> *The strace log for the isql test*
>
>
> open("/etc/odbc.ini", O_RDONLY) = 3
>
> fstat(3, {st_mode=S_IFREG|0644, st_size=541, ...}) = 0
>
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1266a9c000
>
> read(3, "\n[ac_dsn]\nDescription "..., 4096) = 541
>
> read(3, "", 4096) = 0
>
> close(3) = 0
>
> munmap(0x7f1266a9c000, 4096) = 0
>
> gettimeofday({1448317191, 204356}, NULL) = 0
>
> gettimeofday({1448317191, 204369}, NULL) = 0
>
> socket(PF_NETLINK, SOCK_RAW, 0) = 3
>
> bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
>
> getsockname(3, {sa_family=AF_NETLINK, pid=16791, groups=00000000}, [12]) = 0
>
> gettimeofday({1448317191, 204447}, NULL) = 0
>
> sendto(3, "\24\0\0\0\26\0\1\3\7\221SV\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
>
> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0\7\221SV\227A\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 108
>
> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"@\0\0\0\24\0\2\0\7\221SV\227A\0\0\n\200\200\376\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 192
>
> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\7\221SV\227A\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
>
> close(3) = 0
>
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
>
> setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
>
> fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
>
> connect(3, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("172.20.0.95")}, 16) = -1 EINPROGRESS (Operation now in progress)
>
> poll([{fd=3, events=POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
>
> getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
>
> sendto(3, "\0\0\1(\0\2\0\0local_ac\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 296, MSG_NOSIGNAL, NULL, 0) = 296
>
> recvfrom(3, 0x8fabe0, 4096, 16384, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
>
> poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
>
> *recvfrom(3, "R\0\0\0\0K\0\0A\230HU\33\276Z", 4096, MSG_NOSIGNAL, NULL, NULL) = 15*
>
> sendto(3, "Q \0", 3, MSG_NOSIGNAL, NULL, 0) = 3
>
> sendto(3, "X", 1, MSG_NOSIGNAL, NULL, 0) = 1
>
> close(3) = 0
>
> write(2, "[ISQL]ERROR: Could not SQLConnec"..., 34[ISQL]ERROR: Could not SQLConnect
>
> ) = 34
>
> semop(4292619, {{0, 0, 0}, {0, 1, SEM_UNDO}}, 2) = 0
>
> semop(4292619, {{0, -1, SEM_UNDO}}, 1) = 0
>
> shmdt(0x7f1266aa9000) = 0
>
> exit_group(1) = ?
>
>
>
>
>
> On Sat, Nov 28, 2015 at 3:23 AM, Michael Paquier <
> michael(dot)paquier(at)gmail(dot)com> wrote:
>
>> On Sat, Nov 28, 2015 at 6:15 AM, wrote:
>> > Linux odbc package is unixODBC-2.2.14-12.el6_3.x86_64.
>> >
>> > ODBC driver is 9.3.4 which is the latest from the 9.3 repo package.
>>
>> "9.3.4" is not a version number referring to the ODBC driver. This is
>> a PostgreSQL version number. Are you referring to something like
>> 09.03.0400 instead?
>>
>> > Connecting to the postgres DB
>> postgresql93-server-9.3.5-1PGDG.rhel6.x86_64.
>> > And there is a problem with odbc connection: The database does not
>> exist on
>> > the server or user authentication failed.
>> >
>> > Restoring the odbc driver from 9.3.4 to 9.3.3 solved the issue. Also the
>> > same problem was found in 9.0 driver as well.
>> > There is no errors logged in postgres.
>>
>> Without more information there is nothing we can really do here... And
>> ODBC bugs are more adapted if sent to the mailing list pgsql-odbc.
>> --
>> Michael
>>
>
>
>
> --
> *Terry Xie*
> Senior Software Engineer
> *P:* 604-678-2877
> *E:* txie(at)incognito(dot)com
> *Toll-Free:* 1-800-877-1856
>
>
> *F:* 604-688-4339
> *VoIP:* sip:877(at)sip(dot)incognito(dot)com
>
> [image: Incognito Software Inc.] <http://www.incognito.com>
>
> <http://www.incognito.com/company/events>
>

--
*Terry Xie*
Senior Software Engineer
*P:* 604-678-2877
*E:* txie(at)incognito(dot)com
*Toll-Free:* 1-800-877-1856

*F:* 604-688-4339
*VoIP:* sip:877(at)sip(dot)incognito(dot)com

[image: Incognito Software Inc.] <http://www.incognito.com>

<http://www.incognito.com/company/events>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Keith Fiske 2015-11-30 21:31:02 schema-only pg_dump inconsistently dumps some view definitions
Previous Message Terry Xie 2015-11-30 17:37:40 Re: BUG #13786: ODBC driver doesn't work to connect to database