From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Degraded performance during table rewrite
Date: Fri, 03 Jul 2020 22:31:09 -0400
Message-ID: <1154267.1593829869@sss.pgh.pa.us> (raw)
In-Reply-To: <CABZeWdxu=04m-xEHbY5Rdsvb_s98=yKfJdGRzSWZ5PkKr8Z=6A@mail.gmail.com>
References: <CABZeWdxmAafKEr7tugufWYUgAS3AnVRAwCRA8GOnRh-aTzeyCA@mail.gmail.com>
<1115603.1593811564@sss.pgh.pa.us>
<CABZeWdxu=04m-xEHbY5Rdsvb_s98=yKfJdGRzSWZ5PkKr8Z=6A@mail.gmail.com>
Mohamed Wael Khobalatte <mkhobalatte@grubhub.com> writes:
> Do you happen to know if there is an upper limit to how much time the
> planner is willing to spend on this?
There is not. (I have considered that idea, but it's not implemented.
I'm not sure whether there's still much practical problem given the
v11+ behavior, so I'm not in a hurry to complicate things more.)
Another idea that might conceivably be useful to you on 9.6 is to
reorganize the bulk deletions so that most of them aren't at the endpoint
of the live id range. If you made it so that the extremal values are
deleted last, you'd never hit this behavior.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, mkhobalatte@grubhub.com
Subject: Re: Degraded performance during table rewrite
In-Reply-To: <1154267.1593829869@sss.pgh.pa.us>
References: <CABZeWdxmAafKEr7tugufWYUgAS3AnVRAwCRA8GOnRh-aTzeyCA@mail.gmail.com> <1115603.1593811564@sss.pgh.pa.us> <CABZeWdxu=04m-xEHbY5Rdsvb_s98=yKfJdGRzSWZ5PkKr8Z=6A@mail.gmail.com> <1154267.1593829869@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox