pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Auto-analyse vs manual analyze
2+ messages / 2 participants
[nested] [flat]

* Auto-analyse vs manual analyze
@ 2020-12-08 17:00  Mai Peng <maily.peng@webedia-group.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mai Peng @ 2020-12-08 17:00 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hello,
Is there a difference between an autoanalyze and a manual analyze ?
I got an error when I simply select from a function

HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
 CONTEXT:  SQL function "test_v1" during startup automatic analyze of table « table"

A simple manual analyze resolved my problem.

Thank you
My




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Auto-analyse vs manual analyze
@ 2020-12-08 17:11  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Mai Peng <maily.peng@webedia-group.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-12-08 17:11 UTC (permalink / raw)
  To: Mai Peng <maily.peng@webedia-group.com>; +Cc: pgsql-admin@lists.postgresql.org

Mai Peng <maily.peng@webedia-group.com> writes:
> Is there a difference between an autoanalyze and a manual analyze ?

autoanalyze runs with a restrictive search_path setting.

> I got an error when I simply select from a function

This suggests that your function isn't being sufficiently careful
to schema-qualify names it uses.  (If you don't want to change the
function text, adding a SET clause to force the desired search_path
would work, though it does carry a bit of performance penalty.)

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-12-08 17:11 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 17:00 Auto-analyse vs manual analyze Mai Peng <maily.peng@webedia-group.com>
2020-12-08 17:11 ` Tom Lane <tgl@sss.pgh.pa.us>

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