|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Peter Geoghegan <pg(at)heroku(dot)com>|
|Cc:||Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: Storing pg_stat_statements query texts externally, pg_stat_statements in core|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> I think that "read the whole file" is probably going to net out not any
> more complex as far as our code goes, and it'll be making a lot fewer
> assumptions about how smart the libc level is and what's happening at
> the kernel level. I'll have a go at coding it, anyway.
Attached is a revised patch that does the I/O that way, and also makes
substantial cleanups in the error handling. (The previous patch did
questionable things like resetting the shared hash table while callers
were actively iterating through it, and the error logging left a lot
to be desired as well.) I've chosen to handle failures to load query
text data by just returning NULL for that query text, which seems
reasonable given the new mindset that the query text is auxiliary data
less important than the actual counts.
I've not done much more than smoke-testing on this; I'm thinking about
hot-wiring the code to sometimes force it through the error paths,
just to make sure they act as expected. I've also not done any
real performance testing.
regards, tom lane
|Next Message||Peter Geoghegan||2014-01-25 21:13:15||Re: Storing pg_stat_statements query texts externally, pg_stat_statements in core|
|Previous Message||Tom Lane||2014-01-25 20:04:37||Re: Questionable coding in orderedsetaggs.c|