Thread: Does SET STATISTICS lock the table?

Does SET STATISTICS lock the table?

From
Joseph Shraibman
Date:
Does ALTER TABLE <table> ALTER <field> SET STATISTICS 100; lock the
table?  I just tried to do that while a query is running and the ALTER
is hanging.

Re: Does SET STATISTICS lock the table?

From
Tom Lane
Date:
Joseph Shraibman <jks@selectacast.net> writes:
> Does ALTER TABLE <table> ALTER <field> SET STATISTICS 100; lock the
> table?  I just tried to do that while a query is running and the ALTER
> is hanging.

Any ALTER TABLE will lock the table.

            regards, tom lane