pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Will libpq 8 PQ*cancel functions work with 7.4 servers?
6+ messages / 3 participants
[nested] [flat]

* Will libpq 8 PQ*cancel functions work with 7.4 servers?
@ 2005-06-13 08:46  Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
  0 siblings, 1 reply; 6+ messages in thread

From: Piotr Sulecki @ 2005-06-13 08:46 UTC (permalink / raw)
  To: pgsql-interfaces

Ave!

I'm porting an X application using asynchronous libpq calls from libpq
version 7.4 to version 8.0. One of the things I have to change is the
way of cancelling the queries (the old way, using PQrequestCancel, is
marked as deprecated).

My question is, will the new interface (PQgetCancel / PQcancel /
PQfreeCancel) work with the version 7.4 server? I'd rather not migrate
the server to 8.0 right now, it's a long and painful process (the
database holds about 14 millions tuples).

Also, is there a list of libpq changes between 7.4 and 8.0 available
anywhere?

Regards,

Piotr Sulecki.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Will libpq 8 PQ*cancel functions work with 7.4 servers?
@ 2005-06-13 13:57  Volkan YAZICI <volkan.yazici@gmail.com>
  parent: Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
  0 siblings, 1 reply; 6+ messages in thread

From: Volkan YAZICI @ 2005-06-13 13:57 UTC (permalink / raw)
  To: Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>; +Cc: pgsql-interfaces

Hi,

On 6/13/05, Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl> wrote:
> My question is, will the new interface (PQgetCancel / PQcancel /
> PQfreeCancel) work with the version 7.4 server?

AFAIC, no.

> is there a list of libpq changes between 7.4 and 8.0 available anywhere?

{{{ [ From: http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-connect.c]
Revision 1.289: download - view: text, markup, annotated - select for diffs
Sat Oct 30 23:11:26 2004 UTC (7 months, 1 week ago) by tgl
Branches: MAIN
CVS tags: REL8_0_0BETA5
Diff to previous 1.288: preferred, colored
Changes since revision 1.288: +135 -50 lines

Invent a new, more thread-safe version of PQrequestCancel, called PQcancel.
Use this new function in psql.  Implement query cancellation in psql for
Windows.  Code by Magnus Hagander, documentation and minor editorialization
by Tom Lane.
}}}

Related (colored) diff:
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-connect.c.diff?r1=1.288;r2=...

Regards.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Will libpq 8 PQ*cancel functions work with 7.4 servers?
@ 2005-06-13 14:08  Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
  parent: Volkan YAZICI <volkan.yazici@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Piotr Sulecki @ 2005-06-13 14:08 UTC (permalink / raw)
  To: Volkan YAZICI <volkan.yazici@gmail.com>; +Cc: pgsql-interfaces

Ave!

Volkan YAZICI napisał(a):
>>My question is, will the new interface (PQgetCancel / PQcancel /
>>PQfreeCancel) work with the version 7.4 server?
> 
> AFAIC, no.

That would mean it was a protocol change as well as an API change. If
the protocol was unchanged, the new API would generate the same
link-level events, only in a different way. And I seem to recall reading
somewhere that version 8.0 uses the same link-level protocol for
client-to-backend communication as 7.4 did. What you say contradicts it.

Maybe I'm wrong. My memory is not as good as it used to be... :-)

Regards,

Piotr Sulecki.




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Will libpq 8 PQ*cancel functions work with 7.4 servers?
@ 2005-06-13 14:16  Magnus Hagander <mha@sollentuna.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Magnus Hagander @ 2005-06-13 14:16 UTC (permalink / raw)
  To: Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>; pgsql-interfaces

> Ave!
> 
> I'm porting an X application using asynchronous libpq calls 
> from libpq version 7.4 to version 8.0. One of the things I 
> have to change is the way of cancelling the queries (the old 
> way, using PQrequestCancel, is marked as deprecated).
> 
> My question is, will the new interface (PQgetCancel / PQcancel /
> PQfreeCancel) work with the version 7.4 server? I'd rather 
> not migrate the server to 8.0 right now, it's a long and 
> painful process (the database holds about 14 millions tuples).

I beleive it should. It requires the new libpq library on all machines
you're running it on, but there was no change in the client/server
communications protocol.

//Magnus



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Will libpq 8 PQ*cancel functions work with 7.4 servers?
@ 2005-06-13 14:23  Volkan YAZICI <volkan.yazici@gmail.com>
  parent: Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
  0 siblings, 1 reply; 6+ messages in thread

From: Volkan YAZICI @ 2005-06-13 14:23 UTC (permalink / raw)
  To: Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>; +Cc: pgsql-interfaces

Hi,

On 6/13/05, Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl> wrote:
> Volkan YAZICI napisał(a):
> >>My question is, will the new interface (PQgetCancel / PQcancel /
> >>PQfreeCancel) work with the version 7.4 server?
> >
> > AFAIC, no.
> 
> That would mean it was a protocol change as well as an API change.
> If the protocol was unchanged, the new API would generate the same
> link-level events, only in a different way. And I seem to recall reading
> somewhere that version 8.0 uses the same link-level protocol for
> client-to-backend communication as 7.4 did. What you say contradicts it.

Sorry, I get your question wrong. You're right. There isn't a new
protocol update in related patch. It just creates a more efficient
form for cancel operation. Furthermore, as you can see from the
documentation, you're still able to use obsolete PQrequestCancel()
function with same protocol.

But, as I see from patching date, new code is available only in 8.0
releases. You need to patch your 7.4 libpq library for similar
functionality. (I didn't try it but it should work when you try patch
related source files.) Or, you may use a new libpq with old 7.4
server.

Regards.

P.S. I hope, I didn't miss anything this time :)


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Will libpq 8 PQ*cancel functions work with 7.4 servers?
@ 2005-06-13 17:25  Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
  parent: Volkan YAZICI <volkan.yazici@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Piotr Sulecki @ 2005-06-13 17:25 UTC (permalink / raw)
  To: Volkan YAZICI <volkan.yazici@gmail.com>; +Cc: pgsql-interfaces

Ave!

Volkan YAZICI napisał(a):
> Hi,
> 
> Sorry, I get your question wrong. You're right. There isn't a new
> protocol update in related patch. [...]
> 
> But, as I see from patching date, new code is available only in 8.0
> releases. You need to patch your 7.4 libpq library for similar
> functionality. (I didn't try it but it should work when you try patch
> related source files.) Or, you may use a new libpq with old 7.4
> server.

And that's exactly what I want to do: use a new libpq with an old 7.4
server.

Thank you for your answer.

Piotr Sulecki.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2005-06-13 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-13 08:46 Will libpq 8 PQ*cancel functions work with 7.4 servers? Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
2005-06-13 13:57 ` Volkan YAZICI <volkan.yazici@gmail.com>
2005-06-13 14:08   ` Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
2005-06-13 14:23     ` Volkan YAZICI <volkan.yazici@gmail.com>
2005-06-13 17:25       ` Piotr Sulecki <Piotr.Sulecki@sybilla.traxelektronik.pl>
2005-06-13 14:16 Re: Will libpq 8 PQ*cancel functions work with 7.4 servers? Magnus Hagander <mha@sollentuna.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox