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 1pj5zS-0001x8-7p for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Apr 2023 22:15:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pj5zQ-00023S-37 for pgsql-hackers@arkaria.postgresql.org; Sun, 02 Apr 2023 22:15:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pj5zP-00023I-Pw for pgsql-hackers@lists.postgresql.org; Sun, 02 Apr 2023 22:15:55 +0000 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pj5zI-000WPz-Ki for pgsql-hackers@postgresql.org; Sun, 02 Apr 2023 22:15:55 +0000 Received: by mail-pj1-x1033.google.com with SMTP id q102so25451729pjq.3 for ; Sun, 02 Apr 2023 15:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; t=1680473746; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=kR71pGdUaQj7CX+Cx00PQXle1HTllwqI86ek3BRzYYk=; b=QOS0UApDLp0oL6XEv7P/yKgMCHcOgM0HVrszbpp+LaIKXwkBMsUO0KjL00tiLIWXMH M877YlmBdsHGIaJm+1K18hA1+v9oF1NqdiJAhHCrFkjwL33N9w2YcNRudADJpJobfp8b 8lasyYs3+phMAR9yzuQ6kH4alFLVP/tktu6o/A69rEwtZTNVIHeycdwebSxW6VeJRNDK /DE4LhAZVK6TZMfx4w//TatFKHE6t6hlREx+DRxKVddUObdUVsvgV+2zDv9k9oQJxUBD LA+niIhgXEMw1EoN02+k15/lQonOKc9/XdPsAv2LFNvrbZvY4IvZUaiQODDN5Bj4pMlv w56g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680473746; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kR71pGdUaQj7CX+Cx00PQXle1HTllwqI86ek3BRzYYk=; b=E7P0IeWZRLVixiEitBpZbKSwAEpzkv0cHafrSsFUcut+dtGvywGpYLmqjUaZExnS+9 uUO6DMbS7eNJkaCPJtwrQd8nXIjnTkQbjlu5HgA3QWzeMDk96IK/S1BEPy2dvDhKm+Pg AR7S2RWF1LUEVOFwKQK2GRj2nIHwXDF6eTiBFLMjmJOP+XCbd3sIPMBP5255YHsSm/Nx iecz7pSc8OqK9XuHrEapm/cSnA/BzZZh1ivf1lF7dUzIDRcMntKbUfuDURJHokuad/OV +KFbhGq+LmDxPXXm5aqvMlHN00g9W3bw5/0AhgvmayrhPHdjAI6O5tpVY1CdyE441dBt zKyw== X-Gm-Message-State: AAQBX9fuN21Qknzi+PcWwXRi2LMbUSMz+fNDa/0gq8eIRWQgdN2PvEfV 1PKe4f6bVgzs7gBtomLE9jPnwg== X-Google-Smtp-Source: AKy350anikCKdW986Aadt/AlrggRMjuSgCMGdJOILrYlVcInI0TriwguF03MQ1lI0871A4RmGoIl8g== X-Received: by 2002:a17:90b:384c:b0:240:acdb:c4eb with SMTP id nl12-20020a17090b384c00b00240acdbc4ebmr19963861pjb.45.1680473746364; Sun, 02 Apr 2023 15:15:46 -0700 (PDT) Received: from jeff-laptop.lan (c-73-170-46-202.hsd1.ca.comcast.net. [73.170.46.202]) by smtp.gmail.com with ESMTPSA id c3-20020a170902aa4300b0019f2a7f4d16sm5217596plr.39.2023.04.02.15.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Apr 2023 15:15:45 -0700 (PDT) Message-ID: Subject: Re: Minimal logical decoding on standbys From: Jeff Davis To: Andres Freund Cc: "Drouvot, Bertrand" , Robert Haas , Thomas Munro , Alvaro Herrera , Ibrar Ahmed , Amit Khandekar , fabriziomello@gmail.com, tushar , Rahila Syed , pgsql-hackers Date: Sun, 02 Apr 2023 15:15:44 -0700 In-Reply-To: <20230402213506.ocprj6ky45s4ydtr@awork3.anarazel.de> References: <2d314c22b9e03415aa1c7d8fd1f698dae60effa7.camel@j-davis.com> <061eeb26-156e-6011-02b6-b4b1422e2aa6@gmail.com> <8a7da0c2-b7fe-1c78-4e47-a16239bf4839@gmail.com> <6ab352de1553c1e3d0c7d97c038dc470ca51e772.camel@j-davis.com> <4df984c8-3adb-3b69-0e4e-a491097862ce@gmail.com> <20230402213506.ocprj6ky45s4ydtr@awork3.anarazel.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2023-04-02 at 14:35 -0700, Andres Freund wrote: > Why not offer a function to add a CV to a WES? It seems somehow odd > to require > going through condition_variable.c to create a WES. I agree that it's a bit odd, but remember that after waiting on a CV's latch, it needs to re-insert itself into the CV's wait list. A WaitEventSetWait() can't do that, unless we move the details of re- adding to the wait list into latch.c. I considered that, but latch.c already implements the APIs for WaitEventSet and Latch, so it felt complex to also make it responsible for ConditionVariable. I'm open to suggestion. Regards, Jeff Davis