pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Ankush Chawla <ankushchawla03@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: hot standby in Postgresql 12
Date: Tue, 19 Jan 2021 06:48:17 +0100
Message-ID: <95BFBF96-8C8D-4691-BDE4-918F9F64A9CB@gmail.com> (raw)
In-Reply-To: <CAKFQuway06_MQp3iG2dpOfi+bJ-c7g1hZC1bBXHroraM9Kz0ww@mail.gmail.com>
References: <CAOY8JhBPpZ8JvZ8PGUzAbpz17Ra4yJ4w1s=oja0qzsY3sHdSOg@mail.gmail.com>
	<CAKFQuwbMPfZAcS6tgy3LR9ZVXQMewFkPGfUr4M5nY-4LfChhmg@mail.gmail.com>
	<CAOY8JhA114Ra77p5b5q7xiU6CgxksbX+wzQRcoT_sRQ1O20Kwg@mail.gmail.com>
	<CAKFQuway06_MQp3iG2dpOfi+bJ-c7g1hZC1bBXHroraM9Kz0ww@mail.gmail.com>

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




view thread (19+ messages)  latest in thread

Message-ID: <95BFBF96-8C8D-4691-BDE4-918F9F64A9CB@gmail.com>
Permalink:  ../95BFBF96-8C8D-4691-BDE4-918F9F64A9CB@gmail.com/
Also on:    postgresql.org/message-id/95BFBF96-8C8D-4691-BDE4-918F9F64A9CB@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: paul.foerster@gmail.com, david.g.johnston@gmail.com, ankushchawla03@gmail.com
  Subject: Re: hot standby in Postgresql 12
  In-Reply-To: <95BFBF96-8C8D-4691-BDE4-918F9F64A9CB@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox