Re: Error con logical replication

From: motum hesa <motums(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Lista PostgreSQL <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Error con logical replication
Date: 2017-12-21 18:08:31
Message-ID: CAJu20AgqVHjYHQ5sSThat=TbHGZmOZu=1rELH2VbxzGxx0=bqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

El 21 de diciembre de 2017, 11:31, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
escribió:

> motum hesa escribió:
> > 2017-12-21 10:17 GMT-06:00 Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>:
>
> > Después de activarlo, esto muestra el log:
> >
> > 58304: subtest: 2017-12-21 17:12:28 UTC : replicador(at)xxx test :LOG:
> > logical decoding found consistent point at 389/F3FBC478
> > 58304: subtest: 2017-12-21 17:12:28 UTC : replicador(at)xxx test :DETAIL:
> > There are no running transactions.
> > 58305: subtest: 2017-12-21 17:12:28 UTC : replicador(at)xxx test :LOG:
> > starting logical decoding for slot "subcummins"
> > 58305: subtest: 2017-12-21 17:12:28 UTC : replicador(at)xxx test :DETAIL:
> > streaming transactions committing after 389/F3FBC4B0, reading WAL from
> > 389/F3FBC478
> > 58305: subtest: 2017-12-21 17:12:28 UTC : replicador(at)xxx test :LOG:
> > logical decoding found consistent point at 389/F3FBC478
> > 58305: subtest: 2017-12-21 17:12:28 UTC : replicador(at)xxx test :DETAIL:
> > There are no running transactions.
>
> Hmm, son distintos procesos (58304 primero, 58305 después). żestá
> levantando un proceso nuevo una y otra vez? Eso no está bien. Hay que
> hilar más fino. żseguro no hay ningún ERROR o FATAL en el log? żno
> hace un restart el postmaster de vez en cuando? żqué hay en los logs
> del sistema suscriptor? Por favor activa log_connections en el sistema
> publicador.
>
> żcuántas bases de datos tienes replicando?
>

No sé si son distintos procesos en el top solo vi el proceso 58305
correspondiente al wal_sender, el log no mostró ningún ERROR/FATAL después
de crear la suscripción tampoc o hay restart del postmaster,

el log del suscriptor muestra los siguiente:

: 2017-12-21 17:12:28 UTC : @ :LOG: logical replication apply worker for
subscription "subtest" has started
: 2017-12-21 17:22:29 UTC : @ :FATAL: terminating logical replication
worker due to administrator command
: 2017-12-21 17:22:29 UTC : @ :LOG: worker process: logical replication
worker for subscription 877286 (PID 21846) exited with exit code 1

El FATAL se muestra después de hacer un drop a la suscripción.

Esto me muestra el log después de activar log_connections:

93396: [unknown]: 2017-12-21 18:01:51 UTC : [unknown](at)xxx [unknown] :LOG:
connection received: host=xxx port=14768
93396: [unknown]: 2017-12-21 18:01:51 UTC : replicador(at)xxx test :LOG:
replication connection authorized: user=replicador SSL enabled
(protocol=TLSv1.2, cipher=ECDHE-RSA-AES128-GCM-SHA256, compression=off)
93396: subtest: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :LOG:
logical decoding found consistent point at 38A/9789A0D0
93396: subtest: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :DETAIL:
There are no running transactions.
93397: [unknown]: 2017-12-21 18:01:52 UTC : [unknown](at)xxx [unknown] :LOG:
connection received: host=xxxx port=19955
93397: [unknown]: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :LOG:
replication connection authorized: user=replicador SSL enabled
(protocol=TLSv1.2, cipher=ECDHE-RSA-AES128-GCM-SHA256, compression=off)
93397: subtest: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :LOG:
starting logical decoding for slot "subtest"
93397: subtest: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :DETAIL:
streaming transactions committing after 38A/9789A108, reading WAL from
38A/9789A0D0
93397: subtest: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :LOG:
logical decoding found consistent point at 38A/9789A0D0
93397: subtest: 2017-12-21 18:01:52 UTC : replicador(at)xxx test :DETAIL:
There are no running transactions.

ps ax | grep 93397
93397 - Rs 1:07.54 postgres: wal sender process replicador
xxxx(19955) (postgres)

ps ax | grep 93396

No hay proceso con ese PID

> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2017-12-21 20:28:13 Re: Error con logical replication
Previous Message Alvaro Herrera 2017-12-21 17:31:53 Re: Error con logical replication