Re: .ready and .done files considered harmful - Mailing list pgsql-hackers

From Dipesh Pandit
Subject Re: .ready and .done files considered harmful
Date
Msg-id CAN1g5_GGwn-AbF2pn+=i5T4b2r5ExynXPnnNH0eRpeWDKw-C_Q@mail.gmail.com
Whole thread Raw
In response to Re: .ready and .done files considered harmful  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: .ready and .done files considered harmful
List pgsql-hackers
Hi,

> I don't think it's great that we're using up SIGINT for this purpose.
> There aren't that many signals available at the O/S level that we can
> use for our purposes, and we generally try to multiplex them at the
> application layer, e.g. by setting a latch or a flag in shared memory,
> rather than using a separate signal. Can we do something of that sort
> here? Or maybe we don't even need a signal. ThisTimeLineID is already
> visible in shared memory, so why not just have the archiver just check
> and see whether it's changed, say via a new accessor function
> GetCurrentTimeLineID()?

As of now shared memory is not attached to the archiver. Archiver cannot
access ThisTimeLineID or a flag available in shared memory.

    if (strcmp(argv[1], "--forkbackend") == 0 ||                                                        
        strcmp(argv[1], "--forkavlauncher") == 0 ||                                                      
        strcmp(argv[1], "--forkavworker") == 0 ||                                                        
        strcmp(argv[1], "--forkboot") == 0 ||                                                            
        strncmp(argv[1], "--forkbgworker=", 15) == 0)                                                    
        PGSharedMemoryReAttach();                                                                        
    else                                                                                                
        PGSharedMemoryNoReAttach();

This is the reason we have thought of sending a notification to the archiver if
there is a timeline switch. Should we consider attaching shared memory to
archiver process or explore more on notification mechanism to avoid
using SIGINT?

Thanks,
Dipesh

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Added schema level support for publication.
Next
From: vignesh C
Date:
Subject: Re: Added schema level support for publication.