Re: BUG #15350: Getting invalid cache ID: 11 Errors

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, kieran(dot)mccusker(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15350: Getting invalid cache ID: 11 Errors
Date: 2018-09-02 05:04:36
Message-ID: CAA4eK1KfseLuwNisaLaBKtU8Zv=-1+rWiWy80jJfjGwo7-6Lhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Aug 30, 2018 at 4:16 AM Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>
> On Tue, Aug 28, 2018 at 2:40 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> writes:
> > > We could probably improve that situation by making syscache lookups
> > > (and probably other things too) fail when called from _PG_init() in
> > > regular backends so that extension authors are made aware of this
> > > hazard, or perhaps go the other way and change the order we do things
> > > in parallel workers.
> >
> > Hmm. There's an argument to be made for the latter: we don't really
> > want stuff failing in parallel workers if it works fine normally.
> >
> > On the other hand, it seems clear to me that we *don't* want extensions to
> > be doing stuff like syscache lookups in _PG_init(), because that would
> > prevent them from working as shared_preload_libraries entries.
> >
> > And on the third hand, intentionally breaking code that used to work
> > isn't likely to win us many friends either. So I'm not sure that your
> > first option is really tenable. Perhaps we could get away with doing
> > it in HEAD and not back-patching ... but that does little for existing
> > problems.
>
> Ok, so I guess we should just make it work then. Here's throw-away
> test patch to make "unaccent" blow up in this way, and a draft patch
> to reorder things so that it works.
>

+1 for reordering the things in parallel-workers. It will make the
behavior of parallel workers similar to backends. In fact, I have
proposed that myself sometime back [1] for the similar problem.

[1] - https://www.postgresql.org/message-id/CAA4eK1KH0wd3%2BtUDxMuMbqhLh0kKMu_TOfAcSVWuyfYVt9hfzQ%40mail.gmail.com

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message 1111indiana 2018-09-02 06:27:26 Cache lookup failed for function 1 while enabling postgis on postgres 10
Previous Message Amit Kapila 2018-09-02 04:51:30 Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query