Spawned Background Process Knows the Exit of Client Process?

2020-05-15 Thread Shichao Jin
Hi Postgres Hackers, I am wondering is there any elegant way for self-spawned background process (forked by us) to get notified when the regular client-connected process exit from the current database (switch db or even terminate)? The background is that we are integrating a thread-model based st

Re: Spawned Background Process Knows the Exit of Client Process?

2020-05-18 Thread Ashutosh Bapat
On Fri, May 15, 2020 at 11:53 PM Shichao Jin wrote: > > Hi Postgres Hackers, > > I am wondering is there any elegant way for self-spawned background process > (forked by us) to get notified when the regular client-connected process exit > from the current database (switch db or even terminate)?

Re: Spawned Background Process Knows the Exit of Client Process?

2020-05-18 Thread Shichao Jin
Hi Ashutosh, Thank you for your answer. For the first point, as you suggested, we will migrate to table AM sooner or later. For the second point, your description is exactly correct (an independent process to access the storage engine). We can have multiple threads to overcome the performance is