Re: About dropped notifications

From: Greg Stark <gsstark(at)mit(dot)edu>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: About dropped notifications
Date: 2005-08-30 13:06:06
Message-ID: 87ll2j4ls1.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


CSN <cool_screen_name90001(at)yahoo(dot)com> writes:

> I'm considering setting up a script that listens for
> notifications for a table and if a row is deleted the
> script will delete that row's corresponding files.

One way to deal with this would be to have a boolean flag in the table like
"deleted". Update that flag to true, and have a partial index "where deleted".

Then your daemon can quickly query "select file_name where deleted", process
the files and actually complete the deletion. All your other queries need to
test "where not deleted" or go through a view with a clause like that.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2005-08-30 13:10:36 8.1beta1 RPMs
Previous Message Antimon 2005-08-30 13:05:45 Php abstraction layers