Re: [HACKERS] strange row number estimates in pg9.1rc1

2011-09-01 Thread Bruce Momjian
Tom Lane wrote: I wrote: Sergey E. Koposov m...@sai.msu.ru writes: I'm seeing something weird which looks like a bug in 9.1rc1 after the upgrade 8.4-9.0-9.1 done using pg_upgrade. Hm, I wonder what pg_upgrade left relpages/reltuples set to ... Sure enough, that's the problem.

Re: [HACKERS] strange row number estimates in pg9.1rc1

2011-08-30 Thread Tom Lane
I wrote: Sergey E. Koposov m...@sai.msu.ru writes: I'm seeing something weird which looks like a bug in 9.1rc1 after the upgrade 8.4-9.0-9.1 done using pg_upgrade. Hm, I wonder what pg_upgrade left relpages/reltuples set to ... Sure enough, that's the problem. pg_upgrade leaves

Re: [HACKERS] strange row number estimates in pg9.1rc1

2011-08-30 Thread Sergey E. Koposov
On Tue, 30 Aug 2011, Tom Lane wrote: Sure enough, that's the problem. pg_upgrade leaves relpages/reltuples set to zero, but it also imports the visibility map pages from the old cluster. If the old visibility map shows the table as all-visible, then this happens when you try to VACUUM ANALYZE

Re: [HACKERS] strange row number estimates in pg9.1rc1

2011-08-30 Thread Tom Lane
Sergey E. Koposov m...@sai.msu.ru writes: I wonder what should be the best way to proceed for already migrated databases -- running analyze repeatedly may not be the best way for very large clusters with large tables... You can just manually update pg_class.reltuples to a more reasonable

Re: [HACKERS] strange row number estimates in pg9.1rc1

2011-08-29 Thread Tom Lane
Sergey E. Koposov m...@sai.msu.ru writes: I'm seeing something weird which looks like a bug in 9.1rc1 after the upgrade 8.4-9.0-9.1 done using pg_upgrade. Hm, I wonder what pg_upgrade left relpages/reltuples set to ... INFO: lassource: found 0 removable, 0 nonremovable row versions in 0