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

From Corey Huinker
Subject Re: Statistics Import and Export
Date
Msg-id CADkLM=fyN6RjWYZNTmPyVCPsfR0VkLC9yWZR_bbz1_bTPTQxaQ@mail.gmail.com
Whole thread Raw
In response to Re: Statistics Import and Export  (Corey Huinker <corey.huinker@gmail.com>)
List pgsql-hackers
+1, let's shorten those queries.  The coast is probably pretty
clear now if you want to go do that.

On it. 

The earlier conversion of pg_set_attribute_stats (which once had many not-null params) to pg_restore_* tests (where only the columns that identify the stat row are actually required) meant that a lot of parameters which were previously required were now inconsequential to the test. However, it is important to demonstrate cases where the rest of the restore operation completed after given bad statistic was encountered, but that can be adequately done by one "bystander" parameter rather than the whole fleet.

Other notes:
* organized the tests into roughly three groups:  relation tests, attribute tests, and set-difference tests.
* tests that raise an error bubble up to the top of their respective groups
* tests that would have multiple warnings are reduced to having just one wherever possible
* each test gets a comment about what is to be demonstrated
* attention paid to parameter values to avoid coincidental values that could mislead someone into thinking the value was written somewhere when that just happened to be what was already there, etc.
* the set difference tests remain, as they proved extremely useful in detecting undesirable side-effects during development
Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Anti join confusion
Next
From: Tom Lane
Date:
Subject: Re: Anti join confusion