Re: Replication lag

From: "Kellyn Pot'Vin-Gorman" <dbakevlar(at)gmail(dot)com>
To: Wasim Devale <wasimd60(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Replication lag
Date: 2025-04-17 20:28:37
Message-ID: CAN6wuX3mcGi8Zm4Xhgx1oeT2tBiUa905Cih1SiPdct-f_54n-Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hey Wasim,
You've already checked the lag information in pg_stat_replication,
pg_stat_statements and pg_stat_activity?

Is there any delay in the setup that might be causing the lag?
max_standby_streaming_delay and/or max_standby_archive_delay

From what I understand on logical replication, that is for specific tables
for row level replication and is not for a full database replication. I
believe that's a change that will require a restart, (wal change...)

wal_level = logical

*Kellyn Gorman*
DBAKevlar Blog <http://dbakevlar.com>
about.me/dbakevlar

On Thu, Apr 17, 2025 at 5:15 AM Wasim Devale <wasimd60(at)gmail(dot)com> 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(at)gmail(dot)com> 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
>>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gaspare Boscarino, P.Eng. 2025-04-17 22:04:52 Re: Replication lag
Previous Message Mike L 2025-04-17 15:52:02 Re: logical replication issue