A query in Streaming Replication

2020-06-13 Thread Sreerama Manoj
 Hello,
  I use streaming replication in async mode. When master gets down,
slave will be promoted using a trigger file. During this process ".partial"
file will be created and a WAL file with same ID will be created in a
different time line in slave. When master comes back as slave, it will be
synced to the current master. This is the normal procedure as far as I
understood. But in some cases, ".partial" file is not getting created and
peer DB which comes back as slave is unable to sync when this happens..
Please suggest if this happens in any scenario and how to overcome this.

Thanks & Regards:
Manoj.


Re: A query in Streaming Replication

2020-06-13 Thread Sreerama Manoj
Hello,

Forgot to add the version details. I'm using postgres 10.7 .

On Sat, Jun 13, 2020, 20:26 Sreerama Manoj 
wrote:

> Hello,
>   I use streaming replication in async mode. When master gets down,
> slave will be promoted using a trigger file. During this process ".partial"
> file will be created and a WAL file with same ID will be created in a
> different time line in slave. When master comes back as slave, it will be
> synced to the current master. This is the normal procedure as far as I
> understood. But in some cases, ".partial" file is not getting created and
> peer DB which comes back as slave is unable to sync when this happens..
> Please suggest if this happens in any scenario and how to overcome this.
>
> Thanks & Regards:
> Manoj.
>
>
>


Re: A query in Streaming Replication

2020-06-14 Thread Sreerama Manoj
Hello,

  Can anyone check this and respond please!!

Thanks and regards,
Manoj.


On Sat, Jun 13, 2020, 20:26 Sreerama Manoj 
wrote:

> Hello,
>   I use streaming replication in async mode. When master gets down,
> slave will be promoted using a trigger file. During this process ".partial"
> file will be created and a WAL file with same ID will be created in a
> different time line in slave. When master comes back as slave, it will be
> synced to the current master. This is the normal procedure as far as I
> understood. But in some cases, ".partial" file is not getting created and
> peer DB which comes back as slave is unable to sync when this happens..
> Please suggest if this happens in any scenario and how to overcome this.
>
> Thanks & Regards:
> Manoj.
>
>
>


Re: A query in Streaming Replication

2020-06-22 Thread Sreerama Manoj
Hello,

Thanks for you reply

>> If files are assumed to
> >> be sound, pg_rewind will adjust the old master as  a new standby
>

To use pg_rewind, we should either enable *wal_log_hints  *or initialize
data directory with checksum enabled. These are not default and will not be
enabled in most of the cases. In those scenarios, we cannot pg_rewind to
sync data.

>> The .partial file is created when timeline diverges at midst of a WAL
> segment
>

I read somewhere that a .partial file will definitely be created during
promotion of the slave database and is introduced from the postgres 9.5
version. Please correct me if I am wrong. But in my scenario, it is not
getting generated.

Thanks and Regards,
Manoj.