From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
Cc: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Win32 open items |
Date: | 2004-10-30 18:26:19 |
Message-ID: | 6658.1099160779@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
"Magnus Hagander" <mha(at)sollentuna(dot)net> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2004-10-30 19:33:22 | Re: Win32 open items |
Previous Message | Tom Lane | 2004-10-30 17:51:20 | Re: Cache last known per-tuple offsets to speed long tuple access |