Hi all, Per an offline report from Moshe Jacobson, it is possible to trigger easily cache lookup errors using pg_describe_object with invalid object IDs and pg_describe_object(). I had a closer look at things in this area, to notice that there are other user-facing failures as many things use the same interface: =# select pg_identify_object('pg_class'::regclass, 0::oid, 0); ERROR: XX000: cache lookup failed for relation 0 =# select pg_describe_object('pg_class'::regclass, 0::oid, 0); ERROR: XX000: cache lookup failed for relation 0 =# select pg_identify_object_as_address('pg_class'::regclass, 0::oid, 0); ERROR: XX000: cache lookup failed for relation 0
As my previous opinion on the matter in https://www.postgresql.org/message-id/87wpxfygg9....@credativ.de, I still think that "cache lookup" failures should not be things a user is able to trigger at will, and that those errors should be replaced by proper NULL results. That's clearly not an item for PG10, but we could consider improving things for PG11. Still, we are talking about adding NULLness handling in getObjectDescription(), which goes into low-level functions to grab the name of some objects, and some of those functions have their own way to deal with incorrect objects (format_type_be returns "???" for example for functions). Would we want to improve the error handling of such objects? Or that's not worth the effort? Álvaro, what's your take on the matter as you worked a lot on that? Thoughts, -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers