From: | Michael Lewis <mlewis(at)entrata(dot)com> |
---|---|
To: | Robert Inder <robert(at)interactive(dot)co(dot)uk> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Writing WAL files |
Date: | 2020-10-05 17:29:04 |
Message-ID: | CAHOFxGosVP6OKEgBHrt4gEuA5mcVUTsKhhjGMtYTaks6ojgx3g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I suggest that in PG12 you can monitor the
>> "lag" of a standby server more directly by looking at columns write_lag,
>> flush_lag, replay_lag in the pg_stat_replication view.
>
>
> And are those things updated when there are no changes to the master
> database?
> If so, can anyone make the case that continually checking and updating
> them (how often?) wastes fewer electrons than shipping an empty file every
> few minutes?
>
> Or are they only measured when something is updated?
>
If you setup a scripted process to update a single row with a timestamptz
on the source/primary every minute, then you have a very simple consistent
change and also a way to check on the replica what is current time vs
last_scripted_update_time if you will and know the approx lag. It would
seem like a simple albeit hacky solution to you wanting a file every X
minutes regardless of server activity.
By the by, top-posting (reply above all quoted text) is discouraged on
these groups.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2020-10-05 17:31:36 | Re: UUID generation problem |
Previous Message | Adrian Klaver | 2020-10-05 17:24:04 | Re: UUID generation problem |