pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Question on triggers and plpgsql
Date: Fri, 08 Apr 2005 17:02:25 +0100
Message-ID: <4256AB11.6070206@archonet.com> (raw)
In-Reply-To: <14740.1112974547@sss.pgh.pa.us>
References: <4255AA15.8000508@mochima.com>
	<BE1E8DAA-A829-11D9-9125-000A95B03262@pgedit.com>
	<fef7e50cf33b53ca481ecb2554cd6403@mail.nih.gov>
	<14244.1112970986@sss.pgh.pa.us>
	<20050408145928.GA27718@phlogiston.dyndns.org>
	<14740.1112974547@sss.pgh.pa.us>

Tom Lane wrote:
>  The hypothetical mail-sending process
> would presumably want to send mail and then delete the associated record
> from the table of pending mails ... so what if it fails after sending
> the mail and before committing the delete?
> 
> What this does do for you is replace the risk of phantom emails (mail
> sent but corresponding action inside the database never committed)
> with the risk of duplicate emails (mail-sender sends you another one
> after it restarts).  In most cases I think I'd prefer the latter.

You have this possibility anyway. If a mailserver thinks it has failed 
to forward the message, it will resend. There is always a small window 
where the receiving mailserver might actually have received the message 
without the acknowledgement being logged by the sender.

--
   Richard Huxton
   Archonet Ltd



view thread (14+ messages)  latest in thread

Message-ID: <4256AB11.6070206@archonet.com>
Permalink:  ../4256AB11.6070206@archonet.com/
Also on:    postgresql.org/message-id/4256AB11.6070206@archonet.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-sql@postgresql.org
  Cc: dev@archonet.com, tgl@sss.pgh.pa.us, ajs@crankycanuck.ca
  Subject: Re: Question on triggers and plpgsql
  In-Reply-To: <4256AB11.6070206@archonet.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