Re: How to prioritise walsender reading from pg_wal over WAL writes?

2020-11-19 Thread Alexey Bashtanov
I would first determine where the bottleneck is. Is it really the walsender, or is it on the network or in the standby server's replay? It is really the walsender, and it really is the performance of the WAL storage on the master. Check the difference between "sent_lsn", "replay_lsn" from

Re: How to prioritise walsender reading from pg_wal over WAL writes?

2020-11-18 Thread Alexey Bashtanov
Sorry Laurenz, My reply did not get threaded appropriately. My original question was here: https://www.postgresql.org/message-id/a74d5732-60fd-d18b-05fd-7b2b97099f19%40imap.cc I'd like to prioritize walsender for replication not to lag too much. Otherwise, when I have load spikes on master, stand

Re: How to prioritise walsender reading from pg_wal over WAL writes?

2020-11-18 Thread Alexey Bashtanov
If it helps, here's the details of the hardware config. The controller is |AVAGO MegaRAID SAS 9361-4i|, the SSDs are |INTEL SSDSC2KG960G8| (configured as a raid1). Current scheduler used is deadline. Currently XFS is mounted without nobarriers, but I'm going to set that when there's high load nex

How to prioritise walsender reading from pg_wal over WAL writes?

2020-11-13 Thread Alexey Bashtanov
Hello, I've got a postgres master node that receives a lot of writes, WAL written at 100MB/sec or more at times. And when these load spikes happen streaming replication starts lagging. It looks like the lag happens on sending stage, and is limited by the master pg_wal partition throughput. It

Re: Query Performance Issue

2018-12-28 Thread Alexey Bashtanov
*https://explain.depesz.com/s/Pra8a* Could you share the query itself please? And the tables definitions including indexes. work_mem : 8MB That's not a lot. The 16-batches hash join may have worked faster if you had resources to increase work_mem.