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.96) (envelope-from ) id 1vISOO-001i3Q-34 for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Nov 2025 13:57:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vISOM-000iB3-2O for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Nov 2025 13:57:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vISOM-000iAt-12 for pgsql-hackers@lists.postgresql.org; Mon, 10 Nov 2025 13:57:10 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vISOK-006Nqu-0Q for pgsql-hackers@lists.postgresql.org; Mon, 10 Nov 2025 13:57:09 +0000 Received: from [10.0.2.15] (unknown [130.41.208.2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4d4rnX2fWzzyRw; Mon, 10 Nov 2025 15:57:04 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1762783024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7LZt+HhuR/pInNEZOJzqLiad1W2D4gVb/ZiW1JMyqp0=; b=iOwmyJklVOnzOiRtwAv+SbmgUtOp8IhiHd87DbdZVnWCLvJC7BrJHzXjfpSKMCcPHLNMNT QA/t6p1EyTSWMi37644do2/MRBMbWeS83h1fdwnb7NDF1tMDA966BCRoba8zBiBMtQ2PtU V6inh8ZFtLOSf1onanK7qtGyIu0hVgg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1762783024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7LZt+HhuR/pInNEZOJzqLiad1W2D4gVb/ZiW1JMyqp0=; b=m/zvBKRF91mJwnlxK/YosBjYcuHkgyav0GMR90kDqayu2Jm/Pqq7Cclld3hGD1VfkBW2E/ qrY4luUAP4piS2ebFtvK9CizKg/E587HoPgk0Cu48jZKORG8OgZP8elxUTOGICyljv7Xx9 16qfhyIOKV7AQO5hV2JGNgMgbEBeK1w= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1762783024; a=rsa-sha256; cv=none; b=i4nriWfMpWTS6S8D2IlEIjb5nUrT4OHdDJO5qWqwr4bC7Xg1XNqXJjkCNTAlQsmLbvZD7n n0JQKe2m7vcXiJTt96f1F329KCAyJI2iZ9NUPPMSl3nkTEHXGsr4j+b9dav8s1as4fu4Nv GRQfWMGIyi2SJqoEx44NddqWUGiQeXo= Message-ID: <536409d2-c9df-4ef3-808d-1ffc3182868c@iki.fi> Date: Mon, 10 Nov 2025 15:57:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Trying out To: Thomas Munro , PostgreSQL Hackers References: Content-Language: en-US From: Heikki Linnakangas In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/11/2025 15:17, Thomas Munro wrote: > Hi, > > Here is an experimental patch to try out standard C (and C++) atomics > to implement port/atomics.h, and also add more types and operations. > It's mostly just redirecting our names to the standard ones, except > for our barriers and slightly extended pg_atomic_flag, so there isn't > much left of the code. > 9 files changed, 166 insertions(+), 1824 deletions(-) > ... > 8 files changed, 176 insertions(+), 881 deletions(-) > ... > 7 files changed, 1 insertion(+), 394 deletions(-) Nice! > [PATCH v1 1/4] Add some missing #include . This seems like a good thing regardless of the other patches. The "#include " lines in src/backend/lib/dshash.c and src/backend/storage/lmgr/condition_variable.c are slightly misplaced: system headers should be included between "postgres.h" and other postgres headers. > Here also is a semi-independent patch to implement storage/spin.h with > pg_atomic_flag. It keeps a small amount of the architecture-specific > magic, but moves it out to src/port/spin_delay.h. Makes sense. The patch removes 'src/template/solaris'. Is that on purpose? Is that an independent cleanup that could be committed immediately? - Heikki