Re: Replication lag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Wasim,

If I understand your problem correctly, you are trying to use the replica to run queries for some kind of report. For those cases, I recommend setting up a logical replication which will allow you to have a replica that can be modified based on your needs. For instance, on the target database (replica) you could create indices to improve the performance of your query. An analysis of the execution plan would be necessary, of course.

Regards,

   Gaspare

On Thu, Apr 17, 2025 at 5:15 AM Wasim Devale <wasimd60@xxxxxxxxx> wrote:
Hi All 

Does wal_level = logical can resolve the issue of replication lag?

On Thu, 17 Apr, 2025, 11:21 am Wasim Devale, <wasimd60@xxxxxxxxx> wrote:
Hi everyone,

We have a setup of primary and replica database. We are using the replica as read only purpose. But the queries are long running queries that takes 30 minutes to complete.

Do we have any settings in place that will not show replication lag and the queries also executes on replica database without competition on WAL reply?

The settings:
Hot standby is off
And maximum streaming delay is set to -1

Thanks,
Wasim 


--
Gaspare Boscarino, P.Eng., M.Eng., MASc.
Founder and CEO
Theorema Systems Inc.
www.theoremasystems.com | +1 604-765-0121

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux