pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Albrecht Dreß <albrecht.dress@arcor.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Error “cache lookup failed for function”
Date: Thu, 20 Feb 2020 12:41:00 -0800
Message-ID: <32cc0d01-c217-ada7-c9eb-7cb29391d4bf@aklaver.com> (raw)
In-Reply-To: <PFPD7MHF.3YTVSZTQ.N5T3PKAJ@KXEKA4CS.MSLFYEKD.WB7M4VLP>
References: <PFPD7MHF.3YTVSZTQ.N5T3PKAJ@KXEKA4CS.MSLFYEKD.WB7M4VLP>

On 2/20/20 11:28 AM, Albrecht Dreß wrote:
> Am 20.02.20 19:32 schrieb(en) Tom Lane:
>> This is, actually, not very surprising.  You dropped the old function 
>> while clients were using it.  The new function is a completely 
>> unrelated object, even if it happens to have the same name.
> 
> Yes, I agree that this was not a too clever approach…
> 
>> It does seem a bit annoying that something in plpgsql is apparently 
>> doing a fresh catalog lookup to find information that likely was 
>> already cached at the start of function execution.
> 
> OK, but after fully stopping the daemon via systemctl (which of course 
> disconnects all clients) and re-starting it, the cache is empty, isn't 
> it?  So the client after re-connecting /should/ find the proper 
> function?  In my case the full restart did *not* help, but produced the 
> same error again afterwards!  I didn't reboot the whole box, though.

It would be nice to know what:

[…]

represented in:

CREATE FUNCTION public.get_result2(mytaskid bigint, OUT data bytea, OUT 
metadata jsonb, OUT errortext text, OUT vanished boolean) RETURNS record
[…]
COMMIT;

The Postgres logs during and after restart might provide some info.

Also the errors thrown when accessing the other function.

> 
> This led me to the assumption that the database was “somehow” damaged.
> 
> Thanks,
> Albrecht.


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (11+ messages)  latest in thread

Message-ID: <32cc0d01-c217-ada7-c9eb-7cb29391d4bf@aklaver.com>
Permalink:  ../32cc0d01-c217-ada7-c9eb-7cb29391d4bf@aklaver.com/
Also on:    postgresql.org/message-id/32cc0d01-c217-ada7-c9eb-7cb29391d4bf@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, albrecht.dress@arcor.de
  Subject: Re: Error “cache lookup failed for function”
  In-Reply-To: <32cc0d01-c217-ada7-c9eb-7cb29391d4bf@aklaver.com>
  References: <PFPD7MHF.3YTVSZTQ.N5T3PKAJ@KXEKA4CS.MSLFYEKD.WB7M4VLP> <32cc0d01-c217-ada7-c9eb-7cb29391d4bf@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox