Custom C function shutdown-signaling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom C function shutdown-signaling

Otto Blomqvist
How do I signal a custom C function that the Postmaster wants to shut down ?

I want to use "pg_ctl restart -mf"  and not "pg_ctl  restart -mi"  because
of data integrity concerns...

Any ideas ?

Thanks

/Otto Blomqvist




---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|

Re: Custom C function shutdown-signaling

Tom Lane-2
"Otto Blomqvist" <[hidden email]> writes:
> How do I signal a custom C function that the Postmaster wants to shut down ?

Do "CHECK_FOR_INTERRUPTS();" at a suitable spot in the C function's main
loop.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|

Re: Custom C function shutdown-signaling

Otto Blomqvist
Once again Tom comes threw and saves the day...!

Thanks Tom !

/Otto Blomqvist



"Tom Lane" <[hidden email]> wrote in message
news:[hidden email]...
> "Otto Blomqvist" <[hidden email]> writes:
> > How do I signal a custom C function that the Postmaster wants to shut
down ?
>
> Do "CHECK_FOR_INTERRUPTS();" at a suitable spot in the C function's main
> loop.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>



---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster