Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: psql patch


  • From: "Jeroen T. Vermeulen" <jtv(at)xs4all(dot)nl>
  • To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
  • Subject: Re: psql patch
  • Date: Mon, 24 Feb 2003 19:13:43 +0100
  • Message-id: <20030224181343.GE97071@xs4all.nl> <text/plain>

On Mon, Feb 24, 2003 at 12:36:56PM -0500, Tom Lane wrote:

> Not without help from the backend --- you have no idea whether a LISTEN
> command might have been executed via some user-defined function.
 
True.  Hadn't thought of that.  The backend does identify a direct
LISTEN to the frontend through PQcmdStatus(), but it doesn't say 
anything about what happens in functions and such.   And similar for 
transactions, I guess.


> Again, it's not all that easy to be sure if you're inside a transaction
> or not.  We looked at this and decided it was impractical to do without
> a protocol addition.

I don't think I followed that discussion to its conclusion at the time, 
but it left me with the impression that such an addition was being 
considered.

However I just took a look at the docs for readline and apparently it
was designed with select() in mind.  So it should be possible to
implement this without any cost to scalability: the server doesn't
care if the frontend is listening when it sends out the notification,
and the frontend can sleep until either a notification or a keypress
arrives.

Or am I missing something basic here?


Jeroen




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group