On Mon, Jun 6, 2016 at 5:06 PM, Andres Freund <and...@anarazel.de> wrote: > On 2016-06-06 16:41:19 -0400, Robert Haas wrote: >> I really don't understand how you can not weigh in on the original >> thread leading up to my mid-March commits and say "hey, this needs a >> better testing tool", and then when you finally get around to >> reviewing it in May, I'm supposed to drop everything and write one >> immediately. > > Meh. Asking you to "drop everything" and starting to push a month later > are very different things. The reason I'm pushing is because this atm > seems likely to slip enough that we'll decide "can't do this for > 9.6". And I think that'd be seriously bad.
To be clear, I'm not objecting to you pushing on this. I just think your tone sounds a bit, uh, antagonized. >> Why do you get two months from the time of commit to weigh in but I >> get no time to respond? > > Really? You've started to apply pressure to fix things days after > they've been discovered. It's been a month. Yes, it would have been nice if I had gotten to this one sooner. But it's not like you said "hey, hurry up" before I started working on it. You waited until I did start working on it and *then* complained that I didn't get to it sooner. I cannot rewind time. >> For my part, I thought I *had* >> written a testing tool - that's what pg_visibility is and that's what >> I used to test the feature before committing it. > > I think looking only at page level data, and not at row level data is is > insufficient. And I think we need to make $tool output the data in a way > that only returns data if things are wrong (that can be a pre-canned > query). OK. I didn't think that was necessary, but it sure can't hurt. >> I know there's a patch. Both Tom and I are skeptical about whether it >> adds value, and I really don't think you've spelled out in as much >> detail why you think it will help as I have why I think it won't. > > The primary reason I think it'll help because it allows users/testers to > run a simple one-line command (VACUUM (scan_all);)in their database, and > they'll get a clear "WARNING: XXX is bad" message if something's broken, > and nothing if things are ok. Vacuum isn't a bad place for that, > because it'll be the place that removes dead item pointers and such if > things were wrongly labeled; and because we historically have emitted > warnings from there. The more complex stuff we ask testers to run, the > less likely it is that they'll actually do that. OK, now I understand. Let's see if there is general agreement on this and then we can decide how to proceed. I think the main danger here is that people will think that this option is more useful than it really is and start using it in all kinds of cases where it isn't really necessary in the hopes that it will fix problems it really can't fix. I think we need to write the documentation in such a way as to be deeply discouraging to people who might otherwise be prone to unwarranted optimism. Otherwise, 5 years from now, we're going to be fielding complaints from people who are unhappy that there's no way to make autovacuum run with (even_frozen_pages true). > I'd also be ok with adding & documenting (beta release notes) > CREATE EXTENSION pg_visibility; > SELECT relname FROM pg_class WHERE relkind IN ('r', 'm') AND NOT > pg_check_visibility(oid); > or something olong those lines. That wouldn't be too useful as-written in my book, because it gives you no detail on what exactly the problem was. Maybe it could be "pg_check_visibility(regclass) RETURNS SETOF tid", where the returned TIDs are non-frozen TIDs on frozen pages. Then I think something like this would work: SELECT c.oid, pg_check_visibility(c.oid) FROM pg_class WHERE relkind IN ('r', 't', 'm'); If you get any rows back, you've got trouble. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers