Logical replication stops updating

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Logical replication stops updating

Yambu
Hi

My logical replication stopped updating, how do i make it start again?
Reply | Threaded
Open this post in threaded view
|

Re: Logical replication stops updating

Laurenz Albe
On Mon, 2020-12-21 at 11:48 +0200, Yambu wrote:
> My logical replication stopped updating, how do i make it start again?

Read the standby log file and fix the problem you see there.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com



Reply | Threaded
Open this post in threaded view
|

Re: Logical replication stops updating

Yambu
Thanks Laurenz,

I got the error below, and i added the primary key on slave table1, but how do i fix the other error  " published relation does not have REPLICA IDENTITY FULL"

logical replication target relation "public.table1" has neither REPLICA IDENTITY index nor PRIMARY KEY and published relation does not have REPLICA IDENTITY FULL

On Mon, Dec 21, 2020 at 11:51 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-12-21 at 11:48 +0200, Yambu wrote:
> My logical replication stopped updating, how do i make it start again?

Read the standby log file and fix the problem you see there.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Reply | Threaded
Open this post in threaded view
|

Re: Logical replication stops updating

Yambu
Hello

I see this error 

 ERROR:  could not start WAL streaming: ERROR:  replication slot "slot1" is active for PID 28212
2020-12-21 11:01:25.630 GMT [1894324] LOG:  background worker "logical replication worker" (PID 1894333) exited with exit code 1

On Mon, Dec 21, 2020 at 12:09 PM Yambu <[hidden email]> wrote:
Thanks Laurenz,

I got the error below, and i added the primary key on slave table1, but how do i fix the other error  " published relation does not have REPLICA IDENTITY FULL"

logical replication target relation "public.table1" has neither REPLICA IDENTITY index nor PRIMARY KEY and published relation does not have REPLICA IDENTITY FULL

On Mon, Dec 21, 2020 at 11:51 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-12-21 at 11:48 +0200, Yambu wrote:
> My logical replication stopped updating, how do i make it start again?

Read the standby log file and fix the problem you see there.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Reply | Threaded
Open this post in threaded view
|

Re: Logical replication stops updating

Yambu
Now i get no errors after increasing wal_receiver_ timeout  and   wal_sender_timeout to 300s on master and slave.

But the slave tables are not getting updates, do i need to do anything since they were so far behind?

On Mon, Dec 21, 2020 at 1:13 PM Yambu <[hidden email]> wrote:
Hello

I see this error 

 ERROR:  could not start WAL streaming: ERROR:  replication slot "slot1" is active for PID 28212
2020-12-21 11:01:25.630 GMT [1894324] LOG:  background worker "logical replication worker" (PID 1894333) exited with exit code 1

On Mon, Dec 21, 2020 at 12:09 PM Yambu <[hidden email]> wrote:
Thanks Laurenz,

I got the error below, and i added the primary key on slave table1, but how do i fix the other error  " published relation does not have REPLICA IDENTITY FULL"

logical replication target relation "public.table1" has neither REPLICA IDENTITY index nor PRIMARY KEY and published relation does not have REPLICA IDENTITY FULL

On Mon, Dec 21, 2020 at 11:51 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-12-21 at 11:48 +0200, Yambu wrote:
> My logical replication stopped updating, how do i make it start again?

Read the standby log file and fix the problem you see there.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Reply | Threaded
Open this post in threaded view
|

Re: Logical replication stops updating

Yambu
No worries, the slave replica has now been updated and in sync.

The change I made of increasing the wal_receiver_ timeout  and   wal_sender_timeout and putting indexes on replicated tables solved it, and I just had to wait for the slave to catch up.

On Mon, Dec 21, 2020 at 1:51 PM Yambu <[hidden email]> wrote:
Now i get no errors after increasing wal_receiver_ timeout  and   wal_sender_timeout to 300s on master and slave.

But the slave tables are not getting updates, do i need to do anything since they were so far behind?

On Mon, Dec 21, 2020 at 1:13 PM Yambu <[hidden email]> wrote:
Hello

I see this error 

 ERROR:  could not start WAL streaming: ERROR:  replication slot "slot1" is active for PID 28212
2020-12-21 11:01:25.630 GMT [1894324] LOG:  background worker "logical replication worker" (PID 1894333) exited with exit code 1

On Mon, Dec 21, 2020 at 12:09 PM Yambu <[hidden email]> wrote:
Thanks Laurenz,

I got the error below, and i added the primary key on slave table1, but how do i fix the other error  " published relation does not have REPLICA IDENTITY FULL"

logical replication target relation "public.table1" has neither REPLICA IDENTITY index nor PRIMARY KEY and published relation does not have REPLICA IDENTITY FULL

On Mon, Dec 21, 2020 at 11:51 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-12-21 at 11:48 +0200, Yambu wrote:
> My logical replication stopped updating, how do i make it start again?

Read the standby log file and fix the problem you see there.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com