On Sun, Oct 8, 2017 at 10:01 AM, athinivas wrote:
> Yes, will take the epoch value from same and create a new file. Upon
> subsequent calls, will access with that filename...if it fails(incase if
> the
> postmaster is restarted), will create a new one.
>
> @Melvin Does this
Yes, will take the epoch value from same and create a new file. Upon
subsequent calls, will access with that filename...if it fails(incase if the
postmaster is restarted), will create a new one.
@Melvin Does this capture all failure scenarios?? Or you have any other
better ways to do it. Your
On Sun, Oct 8, 2017 at 8:33 AM, athinivas wrote:
> Hi,
>
> Thank you...will try it :) ...As of now, I'm creating the filename as
> pg_start_time so that, every time the server is up, a new file will be
> created.
>
>
> Regards,
> Athi
>
>
>
> --
> Sent from:
Hi,
Thank you...will try it :) ...As of now, I'm creating the filename as
pg_start_time so that, every time the server is up, a new file will be
created.
Regards,
Athi
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
--
Sent via pgsql-general mailing list
Actually if the name of the file doesn't matter you could put it into
$PGDATA/pg_stat and name it global.stat. When postgres stops (clean or
because of failure), replaces the file with his own. So your content will be
erased.
I'm not sure it's completely safe but works in simple test.
--
Sent
Look at inotify: https://github.com/rvoicilas/inotify-tools
You can check for instance if postmaster.pid exists.
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
That seems like an odd requirement and I don't think PostgreSQL can do
it itself,
because if postgresql should crash properly then the process that should
write/remove that file would also crash
The simplest way would be to write a cronjob that connects to the
database and does a simple query
>
> On Thu, Oct 5, 2017 at 10:04 AM, athinivas 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
On Thu, Oct 5, 2017 at 10:04 AM, athinivas wrote:
> Hi,
>
> I'm having a requirement to delete a file in system whenever pg server is
> started/crashed. Any idea?
>
> Thanks,
> Athi
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-
> f1843780.html
Hi,
I'm having a requirement to delete a file in system whenever pg server is
started/crashed. Any idea?
Thanks,
Athi
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
10 matches
Mail list logo