Re: Sheduling in SQL - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Sheduling in SQL
Date
Msg-id 3AB0F64D.8010106@tm.ee
Whole thread Raw
In response to Sheduling in SQL  (Paul <magamos@mail.ru>)
Responses Re: Sheduling in SQL
List pgsql-hackers
Tom Lane wrote:

> 
> I've built applications that do roughly this sort of thing in Postgres
> (some of the protocol changes in 6.4 were done to make it easier ;-)).

I may misremember, but IIRC some older protocol (or at least libpq) 
returned 0 as backend pid to listening client if it was notified by itself.

Currently it returns the actual pid for any backend. Is this what you 
changed?

Anyhow we need some _documented_ way to get backend pid (there is one 
actually received and stored with "cookie" for Ctrl-C processing, but 
AFAIK it is neither documented as being the backend id nor is there a 
function to get at it).

For my own use I created a C function pid() but perhaps there should be 
something mainstream for this.

---------------
Hannu



pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: CeBit
Next
From: Tom Lane
Date:
Subject: Re: Sheduling in SQL