Re: database lagging

From: Pepe TD Vo <pepevo(at)yahoo(dot)com>
To: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
Cc: Alvaro Aguayo <aaguayo(at)opensysperu(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: database lagging
Date: 2021-07-23 20:26:01
Message-ID: 1375604206.639870.1627071961896@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(dot)github(at)gmail(dot)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(dot)github(at)gmail(dot)com> wrote:

On Sat, 24 Jul 2021 at 00:29, Pepe TD Vo <pepevo(at)yahoo(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ian Lawrence Barwick 2021-07-26 01:26:56 Re: Issue repmgr 5.2.1 switchover postgres 12 on RHEL8 SELinux enforcing
Previous Message Vijaykumar Jain 2021-07-23 19:43:55 Re: database lagging