Re: pg_upgrade and statistics

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Daniel Farina <daniel(at)heroku(dot)com>, Greg Stark <stark(at)mit(dot)edu>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade and statistics
Date: 2012-03-14 20:40:41
Message-ID: 1331757641.22638.5.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2012-03-13 at 20:34 -0400, Bruce Momjian wrote:
> I frankly am worried that if we copy over statistics even in ASCII
> that don't match what the server expects, it might lead to a crash,
> which has me back to wanting to speed up vacuumdb.

Why can't we maintain a conversion routine for statistics from older
versions? It's not like the statistics layout changes every week.
pg_dump could print out something like

SELECT pg_restore_statistics(catversion, tablename, ... some data ...);
...

and that function would have the knowledge to convert the data and
insert it back into pg_statistic and pg_class.

That can't be that hard considering all the other work we put into
backward compatibility and upgrade capability.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-03-14 20:43:55 Re: Faster compression, again
Previous Message Andrew Dunstan 2012-03-14 20:39:59 Re: patch for parallel pg_dump