Question about replication - Mailing list pgsql-general

From Zhiquan Simon Sui
Subject Question about replication
Date
Msg-id CAMzQg7dbLDQPnz5zFuXv6x1DCXDFs+zpt+S0q3_sH+YQL2FrPg@mail.gmail.com
Whole thread Raw
List pgsql-general
Hi all,

I recently hit a problem about sync replication of postgres. When I check the state of the replication, I got this:
postgres=#  select * from pg_stat_replication ;
 pid  | usesysid | usename  |  application_name   |  client_addr  |               client_hostname               | client_port |         backend_start         | backend_xmin |   state   | sent_location | write_location | flush_location | replay_location | sync_priority | sync_state 
------+----------+----------+---------------------+---------------+---------------------------------------------+-------------+-------------------------------+--------------+-----------+---------------+----------------+----------------+-----------------+---------------+------------
 4674 |       10 | postgres | 10.87.107.182:20133 | 10.87.107.182 | ip-10-87-107-182.us-west-2.compute.internal |       42408 | 2018-08-20 23:51:22.742259+00 |              | streaming | 0/1C83A00     | 0/1C83A00      | 0/1C83B50      | 0/1C83B50       |             1 | sync

As you can see, the flush_location is ahead of write_location. I am wondering how this could happen?

Thanks,
Simon

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Multiple COPY on the same table
Next
From: Raghavendra Rao J S V
Date:
Subject: How to check whether table is busy or free before running the ALTERor creating TRIGGER on that table