Postgresql rds: relation .... does not exists
jjanes answered the question in his comment.
Why use the convolution relname::regclass when the relid is directly available in the table?
using the relid  fixed the issue