Re: Optimization for hot standby XLOG_STANDBY_LOCK redo

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: 邱宇航 <iamqyh(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Optimization for hot standby XLOG_STANDBY_LOCK redo
Date: 2020-05-06 11:05:46
Message-ID: CAA4eK1KO3+6mBsZ8up0KUfiiiFz+DFUZihE4kt2aiY4B3b4iQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 6, 2020 at 8:35 AM 邱宇航 <iamqyh(at)gmail(dot)com> wrote:
>
> And one more question, what LogAccessExclusiveLocks in LogStandbySnapshot is used for?
>

As far as I understand, this is required to ensure that we have
acquired all the AccessExclusiveLocks on relations before we can say
standby has reached STANDBY_SNAPSHOT_READY and allow read-only queries
in standby. Read comments above LogStandbySnapshot.

> Can We remove this.
>

I don't think so. In general, if you want to change and or remove
some code, it is your responsibility to come up with a reason/theory
why it is OK to do so.

> 2020年5月6日 上午10:36,邱宇航 <iamqyh(at)gmail(dot)com> 写道:
>
> I mean that all resources protected by XLOG_STANDBY_LOCK should redo later.
> The semantics of XLOG_STANDBY_LOCK is still kept.
>

I don't think we can postpone it. If we delay applying
XLOG_STANDBY_LOCK and apply others then the result could be
unpredictable as explained in my previous email.

Note - Please don't top-post. Use the style that I and or others are
using in this list as that will make it easier to understand and
respond to your emails.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-05-06 12:16:42 Re: Own index methods
Previous Message Masahiko Sawada 2020-05-06 09:27:53 Re: xid wraparound danger due to INDEX_CLEANUP false