Question about replication

From: Zhiquan Simon Sui <simon(at)thoughtspot(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Abhay Bothra <abhay(dot)bothra(at)thoughtspot(dot)com>
Subject: Question about replication
Date: 2018-08-21 00:46:20
Message-ID: CAMzQg7dbLDQPnz5zFuXv6x1DCXDFs+zpt+S0q3_sH+YQL2FrPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra Rao J S V 2018-08-21 13:25:33 How to check whether table is busy or free before running the ALTER or creating TRIGGER on that table
Previous Message Adrian Klaver 2018-08-20 20:23:13 Re: Multiple COPY on the same table