From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Less than ideal error reporting in pg_stat_statements |
Date: | 2015-10-04 20:25:21 |
Message-ID: | CAM3SWZQ2S7kDr9qaOmsEsotqPR0XU2Gzc8oavw_HvMpSkvPBPQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, Oct 4, 2015 at 1:12 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Sun, Oct 4, 2015 at 1:01 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Ah, right, sorry. I meant to make its result match what gc_texts would
>> get, by not falsely counting entries with dropped texts. That's not
>> what you have in your patch but it seems like an easy enough fix.
>
> I'm trying to make mean_query_len representative of *useful* entry
> query length. I guess I don't have that within gc_texts in my patch,
> but I do have it within entry_dealloc (up to and including considering
> dropped texts), which FWIW is far more important.
To be clear: I wasn't sure why you though I falsely count entries with
dropped texts within entry_dealloc(). I suppose my sense was that
dropped texts ought to not make garbage collection occur too
frequently, which could also be a problem.
Garbage collection ought to occur when the size of the query text file
becomes excessive relative to useful entries. I was worried about the
thrashing risk from dropped text entries. Maybe we could, as an
alternative, not forget the original size of dropped query texts,
relying only on their offset to indicate the text is invalid. Dropped
query texts would then not be special in that sense, which seems like
a good thing all around.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Tiikkaja | 2015-10-04 22:08:49 | ALTER TABLE behind-the-scenes effects' CONTEXT |
Previous Message | Tom Lane | 2015-10-04 20:14:24 | Re: Less than ideal error reporting in pg_stat_statements |