From: Pepe TD Vo <pepevo@yahoo.com>
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Cc: Alvaro Aguayo <aaguayo@opensysperu.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: database lagging
Date: Fri, 23 Jul 2021 20:26:01 +0000 (UTC)
Message-ID: <1375604206.639870.1627071961896@mail.yahoo.com> (raw)
In-Reply-To: <CAM+6J94NrTfF5+BL2iJQpF+aefAikeCU3eWxVy7_NX8-rBWaMg@mail.gmail.com>
References: <1396983439.574027.1627062741652.ref@mail.yahoo.com>
<1396983439.574027.1627062741652@mail.yahoo.com>
<SC1P15201MB223815E976EE2CACECFC7572AFE59@SC1P15201MB2238.LAMP152.PROD.OUTLOOK.COM>
<CAM+6J973p_7jNodoxjNw-v3O6RpYzQ_UtioKbimhpyEx5ion_A@mail.gmail.com>
<CAM+6J947jMMhHBbRYgx85ni8EdfXxS95C5WaQKFQ7N3Yd-X=NA@mail.gmail.com>
<940238887.612531.1627066701703@mail.yahoo.com>
<CAM+6J971dBrN0Qxdgp75xWaZEdMhScVeF_hmFajKnV3OMcBNSQ@mail.gmail.com>
<CAM+6J94NrTfF5+BL2iJQpF+aefAikeCU3eWxVy7_NX8-rBWaMg@mail.gmail.com>
thank you for information urlboth primary_conninfo on master and slave are not setmax_wal_senders = 10max_replication_slots = 1's when I run 'select * from pg_stat_replication/pg_replication_slots;'0 rows
archive_command='/opt/rh/rh-postgresql12/root/bin/syncwal.sh %p %f'
syncwal.sh contains:#!/bin/bashscp $1 slave_ip:/var/opt/rh/rh-postgres12/lib/pgsql/walarchive/$2if [ $? != 0 ]then echo "Archiver error:"exit 1fiexit 0
do I need to set the restore_command and archive_cleanup_command in slave's postgresql.conf only?
another issue is when I restart postgresql.service in master, it takes a little longer as usual but in slave, prompt out as soon as I hit enter to restart the postgresql.service
after modify the postgresql.conf with archive_cleanup_command and restore_command on slave, master is still lagging for write.
Bach-Nga
No one in this world is pure and perfect. If you avoid people for their mistakes you will be alone. So judge less, love, and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success
On Friday, July 23, 2021, 03:44:07 PM EDT, Vijaykumar Jain <vijaykumarjain.github@gmail.com> wrote:
yeah, ignore what I asked. Glad others jumped in before it was deviating.as others said, it would be the replica is lagging or is not reachable/down in synchronous replication.select * from pg_stat_replication/pg_replication_slots would help show the same.
PostgreSQL: Documentation: 13: 26.2. Log-Shipping Standby Servers
On Sat, 24 Jul 2021 at 00:33, Vijaykumar Jain <vijaykumarjain.github@gmail.com> wrote:
On Sat, 24 Jul 2021 at 00:29, Pepe TD Vo <pepevo@yahoo.com> wrote:
I'm running rh-postgresql12 psql version 12.5OS RHEL 7I can run select query but lagging to create role, table,
both in interactive and non interactive mode, it is hanging? all write based queries but not read?if only writes hang, but not reads, do you see any issues/ slowdown with writes on your storage where pg_wal resides?is it network storage or local?
--
Thanks,VijayMumbai, India
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pepevo@yahoo.com, vijaykumarjain.github@gmail.com, aaguayo@opensysperu.com, pgsql-admin@lists.postgresql.org
Subject: Re: database lagging
In-Reply-To: <1375604206.639870.1627071961896@mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox