Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMjzq-003Aoy-FU for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jul 2023 06:52:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qMjzo-00DXq8-Sn for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Jul 2023 06:52:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMjzo-00DXpz-HY for pgsql-hackers@lists.postgresql.org; Fri, 21 Jul 2023 06:52:12 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qMjzk-000t4D-Op for pgsql-hackers@lists.postgresql.org; Fri, 21 Jul 2023 06:52:11 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b708e49059so23880591fa.3 for ; Thu, 20 Jul 2023 23:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689922329; x=1690527129; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7HFPCjg6teNGNFrgIbMl8F7mPKfZ8mKZvBKC48i2ynA=; b=ln/KJl2XrNNODVzQvVsQleisg5XacP4eI4cxSpUtCTYDqpGjvv6ZhO0v7oCaNSr808 BMTl/lj13ZUEkMU85IGdnUxmr6yCyy2ZQxpV9tZVKqdUaG67brUSCc60Fvd6Hgje83l4 pgZ1IL4pahB7BjDv7fuUWh9VoqWQMHarLUs47ZTCzDoP7ayVeYaKtHb0pSbGVYtz8+mP L055iyV9Hh+LUNW1I+3Uxp8E9wcF8qGpCWlMYhuIUHW1m7TPgWe4ds5Kf+UZ8mscS2Ek 9MzMc2spooqZUrwFyJu/xVKvnAC26i+qZym0BOmmoEy2bMcDHhyYSbMRkswU3+cVng5W /8TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689922329; x=1690527129; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7HFPCjg6teNGNFrgIbMl8F7mPKfZ8mKZvBKC48i2ynA=; b=Zg+zs+cIIpow31ogswcq6V+0lFYwc535qkADmhHLtubTRW5Pn5I2jQxqWcRWCVAHoT kRM7W7o5GNAmVq0LACpXIAmoXIHMVaH5nANSXq4Izwye3Muy6rWe37AH1w1dH89MRew7 v1yCZ7wIQJnOe2RK/gE1ZK7PTEL7JzsJorKMGU3Q92NzwF/tT3i58qqyH+B8AT1aKgfM u9YorFv5EKuhs350Eo4si+5b3V7U3Rg7j6BTQaoiyT+KYsXLFSPscK5N0bsul70C7SLJ NyNdE63UV6/OC/z5wjqJCKyX79YFsVaVbAwbFLeOmmaTPJYZpWD6t4sTJycd2oGfGaG1 LGMg== X-Gm-Message-State: ABy/qLZcGkmo3Dh7jZ2VwxBF4DjByCT79dyjuBQ4Ar16sKm7PjGnL+5K Gldlt5UCT8R1kXVm9EvOq1R+wsYlGaFCrYaphCA9hd5H+6s= X-Google-Smtp-Source: APBJJlGZvNrksbVTHBmmcos1DE7guu41VyuXT1fuNCfLxu/aYZZpkIafdQ3a758+B5mqrjlY6jOITMHCsmiEJBrc028= X-Received: by 2002:a2e:954a:0:b0:2b4:765b:f6ee with SMTP id t10-20020a2e954a000000b002b4765bf6eemr821164ljh.41.1689922328686; Thu, 20 Jul 2023 23:52:08 -0700 (PDT) MIME-Version: 1.0 References: <46e53055d8d1c92704d3cd2709c722e7@oss.nttdata.com> In-Reply-To: From: Bharath Rupireddy Date: Fri, 21 Jul 2023 12:21:57 +0530 Message-ID: Subject: Re: Support worker_spi to execute the function dynamically. To: Michael Paquier Cc: Masahiro Ikeda , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jul 21, 2023 at 11:54=E2=80=AFAM Michael Paquier wrote: > > On Fri, Jul 21, 2023 at 11:24:08AM +0530, Bharath Rupireddy wrote: > > Okay. Here's a quick patch for adding TAP tests to the worker_spi > > module. We can change it to taste. > > What do you think if we removed completely the sql/ test, moving it to > TAP so as we have only one cluster set up when running a make check? > worker_spi.sql only does two waits (one for the initialization and one > to check that the tuple has been processed), so these could be > replaced by some poll_query_until()? I think we can keep SQL tests around as it will help demonstrate someone quickly write their own SQL tests. > As we have a dynamic.conf, installcheck is not supported so we don't > use anything with this switch. Besides, updating > shared_preload_libraries and restarting the node in TAP is cheaper > than a second initdb. In SQL tests, I ensured worker_spi doesn't start static bg workers by setting worker_spi.total_workers =3D 0. Again, all of this is not necessary, but it will be a very good example for someone writing extensions and play around with custom config files, SQL and TAP tests etc. --=20 Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com