Comment about not being able to run ANALYZE on replicas

Started by PG Bug reporting formover 4 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/sql-analyze.html
Description:

https://www.postgresql.org/docs/12/sql-analyze.html does not have anything
about not being able to run ANALYZE on replicas.
I now understand that this is because statistics are stored in a table, and
that table is replicated from primary server to the replica, but it would be
helpful to have something about this in the official documentation.

Thanks,
Niko.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: Comment about not being able to run ANALYZE on replicas

PG Doc comments form <noreply@postgresql.org> writes:

https://www.postgresql.org/docs/12/sql-analyze.html does not have anything
about not being able to run ANALYZE on replicas.
I now understand that this is because statistics are stored in a table, and
that table is replicated from primary server to the replica, but it would be
helpful to have something about this in the official documentation.

I'm a little skeptical about that. By that argument, nearly every one
of our SQL command pages would need a disclaimer saying that you can't
use it on a replica.

regards, tom lane