Re: Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Michael Paquier
On Tue, Dec 19, 2017 at 11:14 PM, Greg Stark wrote: > You're not the first to propose something like that. I think an > EXPLAIN ALTER TABLE would also be very handy -- it's currently > impossible to tell without carefully reading the source code whether a > given DDL change will require a full tab

Re: Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Alex Shulgin
On Tue, Dec 19, 2017 at 3:15 PM Greg Stark wrote: > On 19 December 2017 at 10:00, Oleksandr Shulgin > wrote: > > > If there would be an option in the database itself to provide those > > estimation, we wouldn't even need to figure out estimation queries. > > "EXPLAIN CREATE INDEX" anyone? > > Yo

Re: Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Greg Stark
On 19 December 2017 at 10:00, Oleksandr Shulgin wrote: > If there would be an option in the database itself to provide those > estimation, we wouldn't even need to figure out estimation queries. > "EXPLAIN CREATE INDEX" anyone? You're not the first to propose something like that. I think an EXPL

Re: Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Oleksandr Shulgin
On Tue, Dec 19, 2017 at 10:47 AM, Oleksandr Shulgin < oleksandr.shul...@zalando.de> wrote: > (cross-posting admin and hackers) > > Hello, > > I wonder if I'm alone in my wish to have a way for estimating how much > maintenance work memory would suffice to allocate for a session when > creating an

Estimate maintenance_work_mem for CREATE INDEX

2017-12-19 Thread Oleksandr Shulgin
(cross-posting admin and hackers) Hello, I wonder if I'm alone in my wish to have a way for estimating how much maintenance work memory would suffice to allocate for a session when creating an index and avoid spilling to disk? Recently I had to re-create some indexes on a 9.6 server and I had so