Re: postgres_fdw - make cached connection functions tests meaningful

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: postgres_fdw - make cached connection functions tests meaningful
Date: 2021-07-21 10:11:06
Message-ID: CALj2ACXZsp21gYYNtPAP6DL=8-vbuNLLcOqv5_mTx4nqz7JRAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 17, 2021 at 9:37 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> writes:
> > On Thu, Jul 15, 2021 at 3:48 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> More generally, though, I am not sure that I believe the premise of
> >> this patch. AFAICS it's assuming that forcing debug_discard_caches
> >> off guarantees zero cache flushes, which it does not.
>
> > Can the setting debug_discard_caches = 0 still make extra
> > flushes/discards (not the regular cache flushes/discards that happen
> > because of alters or changes in the cached elements)? My understanding
> > was that debug_discard_caches = 0, disables all the extra flushes with
> > clobber cache builds. If my understanding wasn't right, isn't it good
> > to mention it somewhere in the documentation or in the source code?
>
> The reason for this mechanism is that cache flushes can be triggered
> at any time by sinval messages from other processes (e.g., background
> autovacuums). Setting debug_discard_caches allows us to exercise
> that possibility exhaustively and make sure that the code is proof
> against cache entries disappearing unexpectedly. Not setting
> debug_discard_caches doesn't mean that that can't happen, only that
> you can't predict when it will happen.

Thanks. I'm fine with dropping this patch, hence I marked the CF entry
as "rejected".

Regards,
Bharath Rupireddy.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-07-21 10:22:39 Re: Printing backtrace of postgres processes
Previous Message Dean Rasheed 2021-07-21 10:10:16 Re: Numeric x^y for negative x