Re: database lagging

Поиск
Список
Период
Сортировка
От Pepe TD Vo
Тема Re: database lagging
Дата
Msg-id 1375604206.639870.1627071961896@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: database lagging  (Vijaykumar Jain <vijaykumarjain.github@gmail.com>)
Список pgsql-admin
thank you for information url
both primary_conninfo on master and slave are not set
max_wal_senders = 10
max_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/bash
scp $1 slave_ip:/var/opt/rh/rh-postgres12/lib/pgsql/walarchive/$2
if [ $? != 0 ]
then 
echo "Archiver error:"
exit 1
fi
exit 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.EmojiEmojiEmoji
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.



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.5
OS RHEL 7
I 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,
Vijay
Mumbai, India

В списке pgsql-admin по дате отправления:

Предыдущее
От: Vijaykumar Jain
Дата:
Сообщение: Re: database lagging
Следующее
От: Ian Lawrence Barwick
Дата:
Сообщение: Re: Issue repmgr 5.2.1 switchover postgres 12 on RHEL8 SELinux enforcing