public inbox for [email protected]  
help / color / mirror / Atom feed
From: Gaspare Boscarino, P.Eng. <[email protected]>
To: Wasim Devale <[email protected]>
Cc: Pgsql-admin <[email protected]>
Cc: pgsql-admin <[email protected]>
Subject: Re: Replication lag
Date: Thu, 17 Apr 2025 15:04:52 -0700
Message-ID: <CALFaTbNJZODDhn_tWzo-kggLE9gtWwC8agJXx3SNpk7g=wqU+A@mail.gmail.com> (raw)
In-Reply-To: <CAB5fag7aCOwDbdjNyGkanANBL_k_GZ=YTc3Pd8NnVBuM7CUckQ@mail.gmail.com>
References: <CAB5fag5ek2y21Op8emh+t_omMVxjXz9rVOv5HR_YzPNreYtgfA@mail.gmail.com>
	<CAB5fag7aCOwDbdjNyGkanANBL_k_GZ=YTc3Pd8NnVBuM7CUckQ@mail.gmail.com>

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 <[email protected]> wrote:

> Hi All
>
> Does wal_level = logical can resolve the issue of replication lag?
>
> On Thu, 17 Apr, 2025, 11:21 am Wasim Devale, <[email protected]> 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


reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Replication lag
  In-Reply-To: <CALFaTbNJZODDhn_tWzo-kggLE9gtWwC8agJXx3SNpk7g=wqU+A@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox