From: | Robert Creager <robertc(at)spectralogic(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Need help identifying a periodic performance issue. |
Date: | 2021-11-18 22:28:38 |
Message-ID: | 5E5B349F-DCCA-4681-BEE9-25E57288283F@spectralogic.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Nov 18, 2021, at 2:08 PM, Thomas Munro <thomas(dot)munro(at)gmail(dot)com<mailto:thomas(dot)munro(at)gmail(dot)com>> wrote:
This message originated outside your organization.
On Fri, Nov 19, 2021 at 6:03 AM Robert Creager <robertc(at)spectralogic(dot)com<mailto:robertc(at)spectralogic(dot)com>> wrote:
Which would be better? Discard plans or forcing custom plans? Seems like wrapping a copy might be better than the Postgres.conf change as that would affect all statements. What kind of performance hit would we be taking with that do you estimate? Microseconds per statement? Yeah, hard to say, depends on hardware and such. Would there be any benefit overall to doing that? Forcing the replan?
Just to understand what's going on, it'd be interesting to know if the
problem goes away if you *just* inject the DISCARD PLANS statement
before running your COPYs, but if that doesn't help it'd also be
I’m doing that now, “SET plan_cache_mode=force_custom_plan” before the copy, then auto after the copy.
interesting to know what happens if you ANALYZE each table after each
COPY. Are you running any explicit ANALYZE commands? How long do
your sessions/connections live for?
No explicit analyze happening. I’m not super familiar with this code base, but a bit of looking confirmed what I thought, they served via connection pool and appear to live for the life of the app, which could be months.
After this test (tomorrow likely) I can try the explicit ANALYZE after the copy completes.
Best,
Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Creager | 2021-11-18 22:30:39 | Re: Need help identifying a periodic performance issue. |
Previous Message | Tom Lane | 2021-11-18 21:42:25 | Re: Need help identifying a periodic performance issue. |