Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hiE97-0006dy-Tl for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2019 08:28:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hiE96-00056u-Iw for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2019 08:28:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hiE96-000508-74 for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2019 08:28:12 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hiE92-0007t3-NP for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2019 08:28:10 +0000 Received: by mail-wr1-x443.google.com with SMTP id n9so16751835wru.0 for ; Tue, 02 Jul 2019 01:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+Q8fsJv3I15uY1zNp3J+XUw0XuwjE3hfSocUgsV1E0Y=; b=oHk+KueYjEB1YXsbqV5phPThol2u6kLoLhoCe3SBjDI50E/JH8AbdR545+0D+yx0u2 1Giq+drTmyR8RDutO8qH29G7UCSFGOgpD2JybDYYzBCGnsLhim33andUyrDg7RoRp9xW 7RWGxa5EVTUt6lqygKvVxVfvDsH2xxnOQK/aADA7tWi2AKHzUig/TAr2xKwmSJBPptGa P8RhA+2iw/7SFsZDRAEYYtjhWrW07hw5yYjbwzCrwQ10JuGapplsKvkLWVgIHwOdiepM RwbOox8nnjGJiW2QwaeBXiKb/avs7EmDkfV5lVvem1CAfRmdqd866peelCJQfPph1Qii AMVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+Q8fsJv3I15uY1zNp3J+XUw0XuwjE3hfSocUgsV1E0Y=; b=RGKKMeK/wPaTulrKhc6twhwXmVYqodn3bBI/KdVug+u0lGV0lVE5ClzqVBJYGBJlTO O0BsQHCuI2W5fM5BKYzjXUovWWi3s9GQ8JM65CmK6yGfayPYM+aMDSUcPPPl3wXJqPTQ WU1V0RhRH69sGX8Il3SgLN8mlVgfp/AzKFPXbn8bNynScccb1Un2DtVEd5me3bWs5kMn htekfQ251tCFeGCc5kiO0arPI+8A+cuUPsx5HCaPC8LS08OCCQmwWaWyd8NL03vhZp9R Az3SqcGKF+DFuzEWIxYCRuuvo3WWDnk0Kjv2ruZ/Dz/m282ghArVom9AT+A8QoZuHnBM qCVA== X-Gm-Message-State: APjAAAXpoIOuFFsBKX4W5l5uCCnqV/vE/nUWkam0KIwFkXejux92jhff XBq6Jy3LCxTOrLYR7UCVqUMt2A== X-Google-Smtp-Source: APXvYqzj6TcSvqVh7ZBjTHR74fvMAJk8ax9/k3mNCRHBGJcf+cT7/3yGZ8w1eiU2dJy4aGKUQCqk3w== X-Received: by 2002:a5d:680d:: with SMTP id w13mr14629464wru.141.1562056086889; Tue, 02 Jul 2019 01:28:06 -0700 (PDT) Received: from localhost (host86-187-167-65.range86-187.btcentralplus.com. [86.187.167.65]) by smtp.gmail.com with ESMTPSA id j7sm17926059wru.54.2019.07.02.01.28.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 01:28:06 -0700 (PDT) Date: Tue, 2 Jul 2019 10:28:04 +0200 From: Tomas Vondra To: Julien Rouhaud Cc: PostgreSQL Hackers , Kevin Grittner , Michael Paquier Subject: Re: Add parallelism and glibc dependent only options to reindexdb Message-ID: <20190702082804.e7qgfncsyvxpcgra@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716-1444-295967-dirty List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Jun 30, 2019 at 11:45:47AM +0200, Julien Rouhaud wrote: >Hi, > >With the glibc 2.28 coming, all users will have to reindex almost >every indexes after a glibc upgrade to guarantee the lack of >corruption. Unfortunately, reindexdb is not ideal for that as it's >processing everything using a single connexion and isn't able to >discard indexes that doesn't depend on a glibc collation. > >PFA a patchset to add parallelism to reindexdb (reusing the >infrastructure in vacuumdb with some additions) and an option to >discard indexes that doesn't depend on glibc (without any specific >collation filtering or glibc version detection), with updated >regression tests. Note that this should be applied on top of the >existing reindexdb cleanup & refactoring patch >(https://commitfest.postgresql.org/23/2115/). > >This was sponsored by VMware, and has been discussed internally with >Kevin and Michael, in Cc. I wonder why this is necessary: pg_log_error("cannot reindex glibc dependent objects and a subset of objects"); What's the reasoning behind that? It seems like a valid use case to me - imagine you have a bug database, but only a couple of tables are used by the application regularly (the rest may be archive tables, for example). Why not to allow rebuilding glibc-dependent indexes on the used tables, so that the database can be opened for users sooner. BTW now that we allow rebuilding only some of the indexes, it'd be great to have a dry-run mode, were we just print which indexes will be rebuilt without actually rebuilding them. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services