Re: delete a file everytime pg server starts/crashes

From: Ray Cote <rgacote(at)appropriatesolutions(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: athinivas <athinivas(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: delete a file everytime pg server starts/crashes
Date: 2017-10-05 14:51:31
Message-ID: CAG5tnzpaOMDL45TA+18z0D==GEzGOgpCSeDdsXVoWSM=j+Vx3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> On Thu, Oct 5, 2017 at 10:04 AM, athinivas <athinivas(at)gmail(dot)com> wrote:
>
>> Hi,
>>
>> I'm having a requirement to delete a file in system whenever pg server is
>> started/crashed. Any idea?
>>
>> Thanks,
>> Athi
>>
>>
If you’re running on Linux you can modify the init.d (or service) file and
add a line to delete the file.
To remove on crash is likely to require some sort of ongoing monitoring
service to see that the process is no longer running.
If you’re already using a service (such as monit) which brings an
application back up after crash then adding a line to the init.d file may
be sufficient.
—Ray

--
Raymond Cote, President
voice: +1.603.924.6079 email: rgacote(at)AppropriateSolutions(dot)com skype:
ray.cote
Schedule a meeting: https://calendly.com/ray_cote/60min/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message avi Singh 2017-10-05 17:28:31 Postgresql CDC tool recommendations ?
Previous Message Melvin Davidson 2017-10-05 14:32:50 Re: delete a file everytime pg server starts/crashes