auto_explain sample rate

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: auto_explain sample rate
Date: 2015-05-29 01:39:00
Message-ID: CAMsr+YHMZC6COFE4q+246Q_X_6HEdswh=Pu9RROhuNW-=LmgPA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all

It's sometimes desirable to collect auto_explain data with ANALYZE in order
to track down hard-to-reproduce issues, but the performance impacts can be
pretty hefty on the DB.

I'm inclined to add a sample rate to auto_explain so that it can trigger
only on x percent of queries, and also add a sample test hook that can be
used to target statements of interest more narrowly (using a C hook
function).

Sound like a reasonable approach?

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-05-29 01:50:35 Re: RFC: Remove contrib entirely
Previous Message Peter Geoghegan 2015-05-29 01:31:56 Re: Free indexed_tlist memory explicitly within set_plan_refs()