Re: About dropped notifications - Mailing list pgsql-general

From Greg Stark
Subject Re: About dropped notifications
Date
Msg-id 87ll2j4ls1.fsf@stark.xeocode.com
Whole thread Raw
In response to About dropped notifications  (CSN <cool_screen_name90001@yahoo.com>)
List pgsql-general
CSN <cool_screen_name90001@yahoo.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

pgsql-general by date:

Previous
From: Clodoaldo Pinto
Date:
Subject: Re: update functions locking tables
Next
From: Devrim GUNDUZ
Date:
Subject: 8.1beta1 RPMs