Re: [HACKERS] extended stats not friendly towards ANALYZE with subset of columns

2017-04-17 Thread Alvaro Herrera
David Rowley wrote: > On 18 April 2017 at 05:12, Alvaro Herrera wrote: > > Pushed, after tweaking so that a WARNING is still emitted, because it's > > likely to be useful in pointing out a procedural mistake while extended > > stats are being tested. > > Thanks for pushing. > > Seems you maintai

Re: [HACKERS] extended stats not friendly towards ANALYZE with subset of columns

2017-04-17 Thread David Rowley
On 18 April 2017 at 05:12, Alvaro Herrera wrote: > Pushed, after tweaking so that a WARNING is still emitted, because it's > likely to be useful in pointing out a procedural mistake while extended > stats are being tested. Thanks for pushing. Seems you maintained most of my original patch and ad

Re: [HACKERS] extended stats not friendly towards ANALYZE with subset of columns

2017-04-17 Thread Alvaro Herrera
David Rowley wrote: > ERROR: extended statistics could not be collected for column "a" of > relation public.ab1 > HINT: Consider ALTER TABLE "public"."ab1" ALTER "a" SET STATISTICS -1 > > I don't think the error is useful here, as it means nothing gets done. > Probably better to just not (re)bu

[HACKERS] extended stats not friendly towards ANALYZE with subset of columns

2017-03-28 Thread David Rowley
I'm just reviewing Tomas' code for the dependencies part of the stats when I saw something that looked a bit unusual. I tested with: CREATE TABLE ab1 (a INTEGER, b INTEGER); ALTER TABLE ab1 ALTER a SET STATISTICS 0; INSERT INTO ab1 SELECT a, a%23 FROM generate_series(1, 1000) a; CREATE STATISTICS