Re: Question on triggers and plpgsql
От | Richard Huxton |
---|---|
Тема | Re: Question on triggers and plpgsql |
Дата | |
Msg-id | 4256AB11.6070206@archonet.com обсуждение исходный текст |
Ответ на | Re: Question on triggers and plpgsql (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: