Re: hot standby in Postgresql 12

Поиск
Список
Период
Сортировка
От Ankush Chawla
Тема Re: hot standby in Postgresql 12
Дата
Msg-id CAOY8JhA6Ki2i_CvQLgu94t=NxcMb4k6N_MiS3nM1j=_qaGH2MA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: hot standby in Postgresql 12  (Paul Förster <paul.foerster@gmail.com>)
Ответы Re: hot standby in Postgresql 12
Список pgsql-admin
Still the same :

checkpoint;
select pg_switch_wal(); 

loading few tables and did a switch as well , still the same, not able to connect to standby database
psql: error: FATAL:  the database system is starting up

On Tue, Jan 19, 2021 at 11:18 AM Paul Förster <paul.foerster@gmail.com> wrote:
Hi David,

> On 19. Jan, 2021, at 04:48, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> And now the standby is waiting for the next wal file to be archived by the primary.  You should probably set archive_timeout to a non-zero value since the primary doesn’t seem very busy (though you also still need to do at least one write, empty wal files don’t get rotated out and archived.)

you should be able to get around your problem by doing the following on the primary database:

checkpoint;
select pg_switch_wal();

The pg_switch_wal() alone will not trigger WAL file generation if no transaction has been going on. That's why I recommend forcing a checkpoint before that (same with Oracle by the way).

As soon as a WAL is generated, it should get shipped to the standby database. Then it should open.

Cheers,
Paul


--
Best Regards,
Ankush Chawla

В списке pgsql-admin по дате отправления:

Предыдущее
От: Paul Förster
Дата:
Сообщение: Re: hot standby in Postgresql 12
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: hot standby in Postgresql 12