[HACKERS] PITR Signalling the Archiver
A few questions may help to speed up my work I need to send a signal from a backend to the archiver process. 1. What signal should I use? 2. How do I give the processid of the archiver to the backend? The archiver may restart at any time, so its pid could change after a backend is forked. I have answers, but I strive for the best answer. Thanks very much, Best regards, Simon Riggs ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] PITR Signalling the Archiver
Simon Riggs wrote: A few questions may help to speed up my work I need to send a signal from a backend to the archiver process. 1. What signal should I use? You can use any unused signal. I would suggest looking at what the stats processes uses, and use something else like SIGUSR1. 2. How do I give the processid of the archiver to the backend? The archiver may restart at any time, so its pid could change after a backend is forked. I was thinking of having it be in shared memory. I am going to work on that part, but I need to finish the relocatable install stuff for Win32 first. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] PITR Signalling the Archiver
Simon Riggs [EMAIL PROTECTED] writes: I need to send a signal from a backend to the archiver process. 1. What signal should I use? SIGUSR1 or SIGUSR2 would be the safest choices. 2. How do I give the processid of the archiver to the backend? The archiver may restart at any time, so its pid could change after a backend is forked. My answer would be don't. Send a signal to the postmaster and let it signal the current archiver child. Use the existing SendPostmasterSignal() code for the first part of this. regards, tom lane ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] PITR Signalling the Archiver
On Tue, 2004-05-11 at 22:15, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: I need to send a signal from a backend to the archiver process. 1. What signal should I use? SIGUSR1 or SIGUSR2 would be the safest choices. 2. How do I give the processid of the archiver to the backend? The archiver may restart at any time, so its pid could change after a backend is forked. My answer would be don't. Send a signal to the postmaster and let it signal the current archiver child. Use the existing SendPostmasterSignal() code for the first part of this. Brilliant - very clean. Many thanks. Best Regards, Simon Riggs ---(end of broadcast)--- TIP 8: explain analyze is your friend