pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Chernow <ac@esilo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Patches (PostgreSQL) <pgsql-patches@postgresql.org>
Subject: Re: libpq object hooks
Date: Fri, 16 May 2008 22:34:35 -0400
Message-ID: <482E443B.8080903@esilo.com> (raw)
In-Reply-To: <18090.1210990759@sss.pgh.pa.us>
References: <b42b73150804301323i18b00019i62e765708abb65aa@mail.gmail.com>
	<9458.1210875556@sss.pgh.pa.us>
	<482C82BA.3090100@esilo.com>
	<9867.1210877054@sss.pgh.pa.us>
	<482CD76E.6000202@esilo.com>
	<b42b73150805160628y3c175608hc383187951206448@mail.gmail.com>
	<17177.1210949948@sss.pgh.pa.us>
	<482DD3AC.9020207@esilo.com>
	<b42b73150805161249wb67b065le957ef1c0cdaefec@mail.gmail.com>
	<20531.1210969396@sss.pgh.pa.us>
	<b42b73150805161438y2c6d4373sb036d0ed649ddf88@mail.gmail.com>
	<18090.1210990759@sss.pgh.pa.us>

Tom Lane wrote:
>  ISTM the hook
> ought to be able to request that libpq return an out-of-memory failure
> for the query, just as would happen if the malloc failure had happened
> directly to libpq.
> 
> 

I am working on this new patch and that is how I have been implementing it.  If 
the eventProc function returns FALSE for creation events (not destruction 
events), the libpq call that triggered it will fail.  For instance: for the 
creation of result objects "PGEVT_RESULTCREATE", I am clearing the result and 
returning an error value.

I think that is the expected behavior when one calls PQexec and an out-of-memory 
failure occurs.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/



view thread (45+ messages)

Message-ID: <482E443B.8080903@esilo.com>
Permalink:  ../482E443B.8080903@esilo.com/
Also on:    postgresql.org/message-id/482E443B.8080903@esilo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: ac@esilo.com, tgl@sss.pgh.pa.us, mmoncure@gmail.com, andrew@dunslane.net, alvherre@commandprompt.com
  Subject: Re: libpq object hooks
  In-Reply-To: <482E443B.8080903@esilo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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