Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGmeP-00070d-2P for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Mar 2021 17:48:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lGmeN-0006DV-Ut for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Mar 2021 17:48:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGmeN-0006DO-Nu for pgsql-hackers@lists.postgresql.org; Mon, 01 Mar 2021 17:48:07 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lGmeG-000512-Rz for pgsql-hackers@lists.postgresql.org; Mon, 01 Mar 2021 17:48:06 +0000 Received: by mail-pj1-x1029.google.com with SMTP id d2so27358pjs.4 for ; Mon, 01 Mar 2021 09:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dIlAV+b3zZIQIY9Zv9Ne7b2mKpV4DHtMWFa315kaBFw=; b=B/xucjoLj4QQG0zROZJJmwOB/JI2RakTbq3JC7gEMwx/3dp1HUo1UkBKEGZxC+eyt+ rGyfsjKAKznUmG7mIJW6fFGV2HLc8Uqu8Nve+JV3oXSCmzFqdbJWad9EwernoyVqcOA8 z9z1c4KreK+HL89kXh382qCxj4W4dVXDTKCBX0+g1S4xcI7wJT5nyC8f84friHI41Exa +nDb3+4EsPTa31oOJ1KfmHqKq39PKjU2205rRBFRgzD6FPXzCe8Pn/VXQk2HelKlXsk2 zsdS/oeMipulG68ruCxmZzDqjs14LdBgUsi/pOt6wR0pzbJzzq9GHReQxfXeLloxpGaN rcQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dIlAV+b3zZIQIY9Zv9Ne7b2mKpV4DHtMWFa315kaBFw=; b=pLCExHs/Um5jyhYSd8R8UZ/kPySJPA1U6K0c0W3ShD2G6MP502/V/2yAf1c6Q/TCus 2VGxPT/vhfHKOWuKoe3USoVhA5rt8K+iPYTYC7Stj1rMtqE51qmZC/SpqWAd1esvA0wM TMNyvYKQ21ibvRb7Osvzu8lNNI/+1oC1TPX6mBC2cJvEvEr4pik4mlzGu6Hv9fD3FBlM RO9SDJjxkxbDtSwWBS10QUAa5MN7WC6kujLcTajgl7dmUC/pUM/1WMD80vcXqkttRSfQ 3YnSKZFSNBjgb/LA/SHwqja1Qlqki3Bf0qKSgLENALeTdu9DsbaZjahvakd32V1r0EPr HNLg== X-Gm-Message-State: AOAM532djwjMI6/oyo3Lnn5HSjmDjDIjn90LT8C1UK9eE/Cm8mpyw/pz fJVARoa64RE6r0lLa9LHiW4w1lNRrqtdda4q+k79knwL2f9Fd3O5s4gnXdwl6HBo/TUZvGA4/gj z8/cJUBJRRpFQxiTvG/BG16Ag5vcCsqOfjAhyEI5hw1eABcQ2zn2NtitBsMKanZlF4qPIfQRG29 HRzxZueo1JU6wVxiPPJnbuNRm3b7CA6ZM4Bd7JMZRCcaa6TBaOSF7W X-Google-Smtp-Source: ABdhPJzr7TAk9qyq/P4Mg9DpR26f5wjd1+x25rOqH20iazeUMnyPVI/uAp+/karLVWT/OnlVQAXtnA== X-Received: by 2002:a17:90a:7103:: with SMTP id h3mr70195pjk.82.1614620879787; Mon, 01 Mar 2021 09:47:59 -0800 (PST) Received: from laptop280-ma-us.hitronhub.home (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id a15sm22741pju.34.2021.03.01.09.47.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Mar 2021 09:47:58 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: Add --tablespace option to reindexdb From: Mark Dilger In-Reply-To: Date: Mon, 1 Mar 2021 09:47:57 -0800 Cc: Postgres hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Michael Paquier X-Mailer: Apple Mail (2.3608.120.23.2.1) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Feb 25, 2021, at 10:49 PM, Michael Paquier = wrote: >=20 > While on it, I have added tests for toast tables and indexes with a > tablespace move during a REINDEX.=20 In t/090_reindexdb.pl, you add: +# Create a tablespace for testing. +my $ts =3D $node->basedir . '/regress_reindex_tbspace'; +mkdir $ts or die "cannot create directory $ts"; +# this takes care of WIN-specific path issues +my $ets =3D TestLib::perl2host($ts); +my $tbspace =3D 'reindex_tbspace'; +$node->safe_psql('postgres', "CREATE TABLESPACE $tbspace LOCATION = '$ets';"); I recognize that you are borrowing some of that from = src/bin/pgbench/t/001_pgbench_with_server.pl, but I don't find anything = intuitive about the name "ets" and would rather not see that repeated. = There is nothing in TestLib::perl2host to explain this name choice, nor = in pgbench's test, nor yours. You also change a test: $node->issues_sql_like( - [ 'reindexdb', '-v', '-t', 'test1', 'postgres' ], - qr/statement: REINDEX \(VERBOSE\) TABLE public\.test1;/, - 'reindex with verbose output'); + [ 'reindexdb', '--concurrently', '-v', '-t', 'test1', 'postgres' = ], + qr/statement: REINDEX \(VERBOSE\) TABLE CONCURRENTLY = public\.test1;/, + 'reindex concurrently with verbose output'); but I don't see what tests of the --concurrently option have to do with = this patch. I'm not saying there is anything wrong with this change, = but it seems out of place. Am I missing something? =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company