You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE INDEX: don't update table stats if autovacuum=off.
yb conflict resolutions:
- src/test/regress/expected/stats_import.out
>@@ -12,7 +12,36 @@ CREATE TABLE stats_import.test(
<@@ -12,7 +12,35 @@ CREATE TABLE stats_import.test(
>+ 'relallvisible', 24::integer,
>+ 'relallfrozen', 27::integer);
<+ 'relallvisible', 24::integer);
>+SELECT relname, relpages, reltuples, relallvisible, relallfrozen
<+SELECT relname, relpages, reltuples, relallvisible
>+ relname | relpages | reltuples | relallvisible | relallfrozen
>+---------+----------+-----------+---------------+--------------
>+ test | 18 | 21 | 24 | 27
<+ relname | relpages | reltuples | relallvisible
<+---------+----------+-----------+---------------
<+ test | 18 | 21 | 24]
Cause: Missing 99f8f3f: `relallfrozen` was introduced.
Resolution: Feature does not exist in pg15
- src/test/regress/sql/stats_import.sql
>@@ -15,8 +15,25 @@ CREATE TABLE stats_import.test(
<@@ -15,8 +15,24 @@ CREATE TABLE stats_import.test(
>+ 'relallvisible', 24::integer,
>+ 'relallfrozen', 27::integer);
<+ 'relallvisible', 24::integer);
>+SELECT relname, relpages, reltuples, relallvisible, relallfrozen
<+SELECT relname, relpages, reltuples, relallvisible
Cause: Missing 99f8f3f: `relallfrozen` was introduced.
Resolution: Feature does not exist in pg15
We previously fixed this for binary upgrade in 71b6617, but a
similar problem remained when dumping statistics without data.
Fix by not opportunistically updating table stats during CREATE INDEX
when autovacuum is disabled. For stats to be stable at all, the server
needs to be aware that it should not take every opportunity to update
stats. Per discussion, autovacuum=off is a signal that the user
expects stats to be stable; though if necessary, we could create
a more specific mode in the future.
Reported-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://postgr.es/m/CAExHW5vf9D+8-a5_BEX3y=2y_xY9hiCxV1=C+FnxDvfprWvkng@mail.gmail.com
Discussion: https://postgr.es/m/ca81cbf6e6ea2af838df972801ad4da52640a503.camel%40j-davis.com
(cherry picked from commit d611f8b)
0 commit comments