Steve Atkins <steve@blighty.com> writes:
> I'm using postgres for a long-running application[1], where I'd really
> rather the application daemons don't have any access as the postgres
> user. As the schema doesn't change is it safe to analyze the system
> tables as the postgres user once at installation time or should I
> be doing that as part of the normal cronjobbed maintenance?
If you're not doing any schema changes then the ANALYZE stats for the
system tables shouldn't need updates, probably. On the other hand,
I'm not sure what it buys you to avoid it. Running "vacuum analyze"
as the postgres user from a cron job is standard practice in my book.
regards, tom lane