auto_explain sample rate - Mailing list pgsql-hackers

From Craig Ringer
Subject auto_explain sample rate
Date
Msg-id CAMsr+YHMZC6COFE4q+246Q_X_6HEdswh=Pu9RROhuNW-=LmgPA@mail.gmail.com
Whole thread Raw
Responses Re: auto_explain sample rate  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Free indexed_tlist memory explicitly within set_plan_refs()
Next
From: Peter Eisentraut
Date:
Subject: Re: RFC: Remove contrib entirely