Re: Statistics Import and Export - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Statistics Import and Export
Date
Msg-id CADkLM=c94wr-k-Twufg9yW8KB3oSKWHDB_ph5Yvqq=duPH_z-Q@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Corey Huinker <corey.huinker@gmail.com>)
Responses Re: Statistics Import and Export
List pgsql-hackers
ANALYZE takes out one lock StatisticRelationId per relation, not per attribute like we do now. If we didn't release the lock after every attribute, and we only called the function outside of a larger transaction (as we plan to do with pg_restore) then that is the closest we're going to get to being consistent with ANALYZE.

v9 attached. This adds pg_dump support. It works in tests against existing databases such as dvdrental, though I was surprised at how few indexes have attribute stats there.

Statistics are preserved by default, but this can be disabled with the option --no-statistics. This follows the prevailing option pattern in pg_dump, etc.

There are currently several failing TAP tests around pg_dump/pg_restore/pg_upgrade. I'm looking at those, but in the mean time I'm seeking feedback on the progress so far.
 
Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Be strict when request to flush past end of WAL in WaitXLogInsertionsToFinish
Next
From: Michael Paquier
Date:
Subject: Re: Add new error_action COPY ON_ERROR "log"