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 1q9L5H-0000Dt-2j for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jun 2023 07:38:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q9L5F-0005OT-VR for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jun 2023 07:38:25 +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 1q9L5F-0005Fl-Ji for pgsql-hackers@lists.postgresql.org; Wed, 14 Jun 2023 07:38:25 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1q9L5D-0027Ms-4w for pgsql-hackers@lists.postgresql.org; Wed, 14 Jun 2023 07:38:24 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5700b15c12fso2740057b3.1 for ; Wed, 14 Jun 2023 00:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686728302; x=1689320302; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=6DRLsDfcBAQ3hWdsWXivoVEjNtqubRvBZ1qRLcU/8PI=; b=Pr1mQhTnIWemeClz5ywtk1xJoemZ0xjz9l4kiWsOfG0yXlgJrctodXA+gjs7kS1DBa /7wGNEszSRsrUPj82SY22Hw5S4kb7/tmWKTrWkju4Myr+OLxUbc3SIhTB6uN0CEvafXj sateK0heVxhddzn967t4uTnQAaokdTU5P9uzUY99z1JwWs5P8hMCIsZd4iO8DFkGgvI1 OsOxSPsvglJo7diPovU13N+NXswEKYS0XEvt+9gKvGMyWOfXCTMeqp84YnFs0ppnpDAj HRoW2Ms8h1mCzW9sM45djei0V0G/5crLDAyjIBc7MrHya85/hOVPvFwUvXST1kUD8tUz BDAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686728302; x=1689320302; h=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=6DRLsDfcBAQ3hWdsWXivoVEjNtqubRvBZ1qRLcU/8PI=; b=GcKRluRz83ZMjctl3EUY+Q6ZkWhgfK8feQCPj/dUICgdxl73L6fRvDbLRaGI036k1K Y0kKFePbBpOOzD/Yb1IDHveIlapOV2FqBorF3XwdeXzDjRqMR9vgMk7AjZ1kkhS4LJN3 lRNeQ1Mwt+9PeYWqdpxmInsFhW+LczsBJ6s/m1bCLgcmrYbmDDpUEYszvogkQ2Jeohmp V5K9ETt99uYw3DdrS/TVgTe/CuLVdBPkpAKUAJtelx1MjluqLFhWEdleNzx9Ha7hTL64 n/c9fpXc57huaRj7Wi5FBAW/g46bqclqi/+ovA4dh0jfWudf/y56Qsaa8uPS6X2usbw7 fz6Q== X-Gm-Message-State: AC+VfDyP1WGFckrjAetUYy4fH2HcidLzRNehJ9WEGX4em5TS4BZ73t/i gGpRCiz5rRSZ/49qwQJTi3bkaAoysds2AXq6yyY= X-Google-Smtp-Source: ACHHUZ7aW+5qq4sGi89yV+3WL0MOJMH5voZIR5gnS9Qvw8waCHu8pWIvptALgqzTWgWYYc04FVQb/RaRyAZwt249Fxw= X-Received: by 2002:a0d:df06:0:b0:56c:fe54:4181 with SMTP id i6-20020a0ddf06000000b0056cfe544181mr980994ywe.44.1686728301955; Wed, 14 Jun 2023 00:38:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Guo Date: Wed, 14 Jun 2023 15:38:10 +0800 Message-ID: Subject: Re: Replace (GUC_UNIT_MEMORY | GUC_UNIT_TIME) with GUC_UNIT in guc.c To: Masahiko Sawada Cc: Japin Li , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000454cb405fe120979" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000454cb405fe120979 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jun 14, 2023 at 1:07=E2=80=AFPM Masahiko Sawada wrote: > On Wed, Jun 14, 2023 at 12:33=E2=80=AFPM Japin Li w= rote: > > Hi, hackers > > > > We use (GUC_UNIT_MEMORY | GUC_UNIT_TIME) instead of GUC_UNIT even thoug= h > we > > already define it in guc.h. > > > > Maybe using GUC_UNIT is better? Here is a patch to fix it. > > Yeah, it seems more consistent with other places in guc.c. I'll push > it, barring any objections. +1. BTW, it seems that GUC_UNIT_TIME is not used anywhere except in GUC_UNIT. I was wondering if we can retire it, but maybe we'd better not. It still indicates that we need to use time units table. Thanks Richard --000000000000454cb405fe120979 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Wed, Jun 14, 2023 at 1:07=E2=80=AFPM M= asahiko Sawada <sawada.mshk@gma= il.com> wrote:
On Wed, Jun 14, 2023 at 12:33=E2=80=AFPM Japin Li <japinli@hotmail.com> wrote= :
> Hi, hackers
>
> We use (GUC_UNIT_MEMORY | GUC_UNIT_TIME) instead of GUC_UNIT even thou= gh we
> already define it in guc.h.
>
> Maybe using GUC_UNIT is better?=C2=A0 Here is a patch to fix it.

Yeah, it seems more consistent with other places in guc.c. I'll push it, barring any objections.

+1.=C2=A0 BTW, = it seems that GUC_UNIT_TIME is not used anywhere except in
GUC_UNIT.=C2= =A0 I was wondering if we can retire it, but maybe we'd better
not.= =C2=A0 It still indicates that we need to use time units table.

Than= ks
Richard
--000000000000454cb405fe120979--