Re: .ready and .done files considered harmful

Поиск
Список
Период
Сортировка
От Dipesh Pandit
Тема Re: .ready and .done files considered harmful
Дата
Msg-id CAN1g5_GGwn-AbF2pn+=i5T4b2r5ExynXPnnNH0eRpeWDKw-C_Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: .ready and .done files considered harmful  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: .ready and .done files considered harmful
Список 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 по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Added schema level support for publication.
Следующее
От: vignesh C
Дата:
Сообщение: Re: Added schema level support for publication.