Re: Win32 open items

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Win32 open items
Дата
Msg-id
6658.1099160779@sss.pgh.pa.us
Ответ на
Re: Win32 open items (Magnus Hagander)
Список
Дерево обсуждения
Re: Win32 open items "Magnus Hagander" <mha@sollentuna.net>
Re: Win32 open items Tom Lane <tgl@sss.pgh.pa.us>
"Magnus Hagander"  writes:
> Here is an attempt at this. First patch contains the changes to libpq,
> second patch contains changes to psql to use this API. Docs not updated
> yet, pending approval of the general idea at least :)

I think it would be better to dispense with the PQgetCancelError
function and just make the signature of PQcancel be
	int PQcancel(PGcancel *cancel, char *errbuf, int errbuflen);
where errbuf would normally point to a local array in the calling
function.

As-is, PQcancel is itself not thread safe because it is scribbling
on the PGcancel struct.  I thought the whole point of this exercise
was to allow multiple threads to use the PGcancel struct; which seems
to me to imply that it had better be read-only to PQcancel.

We don't need the cancelConnLock if this is done properly (at least,
assuming that storing a pointer is atomic, which seems reasonable).

			regards, tom lane
В списке pgsql-patches по дате отправления
От: Tom Lane
Дата:
От: Magnus Hagander
Дата:
Сообщение: Re: Win32 open items
FAQ