From: | Алексей Заяц <alexey(dot)zayats(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2724: Could not check connection status with "ssl=on" |
Date: | 2006-10-30 09:43:43 |
Message-ID: | 200610301243.44195.alexey.zayats@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers pgsql-patches |
Hi.
> I would argue that this is an OpenSSL bug: it should not be trying to
> write on a connection that it knows perfectly well is already dead.
> (It should know that, anyway, because the only way that pqReadData would
> be trying to close the connection is that it got an error indication
> from OpenSSL.)
May be, may be...
> Possibly we could work around the problem by disabling SIGPIPE during
> connection close, but I don't really see why we should have to do that.
While take a look at source of libpq, i have discover following:
while reading from pipe, you are getting
case SSL_ERROR_ZERO_RETURN:
SOCK_ERRNO_SET(ECONNRESET);
but why you'r do not check
SOCK_ERRNO != ECONNRESET
while closing ssl connection ?
i was trying this and all is work fine.
In function close_SSL you are call SSL_shutdown to shutdown ssl pipe.
But if you are already get ECONNRESET (by pear?), why you call whi funtcion?
From openssl docs.
SSL_shutdown - shuts down an active TLS/SSL connection. It sends the ``close
notify'' shutdown alert to the peer.
That's why i've got SIGPIPE.
> That's pretty much a waste of time, because all it tells you is whether
> the connection was good the last time a query was done. It is *not*
> intended as an active "ping".
Ok, i'll take it in my mind.
Alexey Zayats.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-10-30 14:56:22 | Re: Bug: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index" |
Previous Message | Rusty Conover | 2006-10-30 09:32:35 | Bug: ERROR: duplicate key violates unique constraint "pg_type_typname_nsp_index" |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2006-10-30 13:42:27 | Re: WAL logging freezing |
Previous Message | Teodor Sigaev | 2006-10-30 08:25:08 | Re: NOTICE: word is too long INSERT 0 3014 |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2006-10-30 13:42:27 | Re: WAL logging freezing |
Previous Message | Neil Conway | 2006-10-30 00:08:23 | Re: small typo in backup docs |