Re: Logical replication and restore from pg_basebackup

From: Dmitry Vasiliev <dmitry(dot)vasiliev(at)coins(dot)ph>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Logical replication and restore from pg_basebackup
Date: 2019-02-11 15:36:00
Message-ID: CANCe5h3NO++gSeMTUw9N4vsJEqL4Z08oR8=9cKJ9SxePEaZBsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At the start of the logical subscriber is not informed that it is connected
to the logical replication slot with a non-consistent state.
Whether I understood correctly that, postgresql deceives the user and data
in logical replication cannot be trusted.

2019-02-11 17:22:20.103 MSK [71156] LOG: database system was shut down at
2019-02-11 17:22:19 MSK
2019-02-11 17:22:20.108 MSK [71154] LOG: database system is ready to
accept connections
2019-02-11 17:22:20.243 MSK [71171] LOG: logical replication apply worker
for subscription "sub_pgbench" has started
2019-02-11 17:22:20.260 MSK [71174] LOG: logical replication table
synchronization worker for subscription "sub_pgbench", table
"pgbench_accounts" has started
2019-02-11 17:22:23.422 MSK [71174] LOG: logical replication table
synchronization worker for subscription "sub_pgbench", table
"pgbench_accounts" has finished
2019-02-11 17:22:27.807 MSK [71269] LOG: database system was interrupted;
last known up at 2019-02-11 17:22:24 MSK
2019-02-11 17:22:27.824 MSK [71269] LOG: recovered replication state of
node 1 to 0/0
2019-02-11 17:22:27.825 MSK [71269] LOG: redo starts at 0/C000028
2019-02-11 17:22:27.825 MSK [71269] LOG: consistent recovery state reached
at 0/C0000F8
2019-02-11 17:22:27.826 MSK [71269] LOG: redo done at 0/C0000F8
2019-02-11 17:22:27.883 MSK [71267] LOG: database system is ready to
accept connections
2019-02-11 17:22:27.893 MSK [71276] LOG: logical replication apply worker
for subscription "sub_pgbench" has started

On Mon, Feb 11, 2019 at 5:39 PM Dmitry Vasiliev <dmitry(dot)vasiliev(at)coins(dot)ph>
wrote:

> What is the scope of logical replication if I cannot make recovery from
> pg_basebackup?
>
> in this example:
> https://gist.github.com/vadv/e55fca418d6a14da71f01a95da493fae I get
> logically unsynchronized data at the subscriber and publisher, but I'm not
> told anything about it in the log.
>
> Do I understand correctly that logical replication and recovery from
> pg_basebackup are incompatible things?
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-02-11 15:46:07 Re: libpq compression
Previous Message Hamlin, Garick L 2019-02-11 15:10:54 Re: libpq compression