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 1whvhH-000UfE-2n for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 20:50:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whvhF-00EdjL-0y for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 20:50:14 +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 1whvhE-00Edj6-2S for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 20:50:13 +0000 Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1whvh6-00000000NEI-2n5x for pgsql-hackers@postgresql.org; Thu, 09 Jul 2026 20:50:07 +0000 Received: by mail-ot1-x32c.google.com with SMTP id 46e09a7af769-7e9ecd7216cso170614a34.3 for ; Thu, 09 Jul 2026 13:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783630204; x=1784235004; darn=postgresql.org; h=content-disposition:content-type:mime-version:message-id:subject:to :from:date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=xjRc258s3jhHgU3lvbs8utUeXA/eM+cnOKVRKnoN4M8=; b=V5LJ4fEV9EFhn04mcLfzaaqZddtFwgSdb/6KAVfRI1qteiD6O6y/5E1Sv99itO4eSg RE0jicHvc/UG8w63vfjQar9TbzcJ1j+c3sVmRIEJ5BeDngvK5plC/VbSDdi9cCmsJ6Vu FRN8qLcpTd9XgToTOCvYQwJEeif+xUvXW48ess2VWuAsaPfJFZwffrjvaxPU/AKYt9HR rlidCyQ8wb17HC591QaWJxaRtVDUKEnKr8lUf5nfY7e6xeEl6F3CjY7qF8zUdjag/Q/7 Q6DDUk4P05dr2NIx78efSg/RtZMYrJ3BMEito62SWVBIskk/uUunOhPtgsN+wff35t+b n3MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783630204; x=1784235004; h=content-disposition:content-type:mime-version:message-id:subject:to :from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xjRc258s3jhHgU3lvbs8utUeXA/eM+cnOKVRKnoN4M8=; b=M0+bmrPDj07QRESp0GykE52I5ZkDHZIOE0yOsg/wBs1NIO04tSCGUJoIEQXE+E26QJ xxcs/a9271AJCxEQeYE/PvuBNqPX/6dCFn4efsKTsDwH/NrTTCbp5dKbEjKy61cppRBe 0eZAnFIQNCUOc9Gm2HpoK9pWywY98WzY3U/3xmZ2rpG5V0cru5Bp/2GM+GYqmolQwjWB e2ZjdEYAjQtsjPGDj5ef6FpiQ8XC6Ou6PvwrjMGRpBRKWdnlHY3TqN11HKY4ftdEUdan 9u8K3v0on4SJsRNDTHG/EiQfOG1ZsKk5iVnDteQLBFrJ9j3We/vGoIz9EIchN+LGQCKG omsg== X-Gm-Message-State: AOJu0YzNKFTcYqliz20b5RE3CWH3K5m3FgUjbrFRq3SC2u0C8hb20+/4 s8y4ome1VjP2DvNR9HIxoi9lIHcNG+ecTdTIryOIHvyEnbPkttHHqUnOm2YXYw== X-Gm-Gg: AfdE7cmDvlVIoERN15Yn6krWT7kXsoduuEUdPJqaBbn42OhOFM4CcFZ13abjLbh+zZ5 JjLQczjAXfu/l4ppRNX+abLOwfEwbKtIrAWRXqWXxQuyttY5XouxV/TLlcI8y0ubfdiym0pwhYx ZqyCryLgtEkufoTu672cBOZyOeRh00p2qQjr8uHFl3DMdQ2Y8KA8Et6yREHh0E0I6eNcqQJ6orp BwIdIOE6mkxVvoHmOL3li11QE/Vfg16ChubHJFJWcs8A+LeSYGOa3MYa9AnfTBSUPELR5M+pHSw UNNTJqxeGBTx8u+exbiPqDZSmm4RG3OuSuL6HCdMwpQ+LcdR9DaxD245iJASF1Hz2SstLAthdBf SEeT4PNrB1vz5QeslafVlP6kjHSIAMefr8lF0FUgC6eIWN0M1/gTs64tOC0FstBFSNamHiDAlCG XN0hKz+MrQ/W6JRMmThVIstH1iz0wHUBp8XDxhue3Csvv62kuVyd/LKEKjuZIxJ/F8ZF0ea+xx+ 0KytIia0Vc= X-Received: by 2002:a05:6830:6aae:b0:7dc:d0e3:5bc1 with SMTP id 46e09a7af769-7ebcfe7da83mr6444576a34.13.1783630204148; Thu, 09 Jul 2026 13:50:04 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7ebcae1dce3sm4964683a34.3.2026.07.09.13.50.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 13:50:03 -0700 (PDT) Date: Thu, 9 Jul 2026 15:50:01 -0500 From: Nathan Bossart To: pgsql-hackers@postgresql.org Subject: convert various variables to atomics Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Ot5x3ffkWEuxilWO" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Ot5x3ffkWEuxilWO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch set converts various variables to atomics, thereby allowing us to remove a handful of spinlocks and volatile qualifiers. We've been slowly moving in this direction for a while already. I think all of these are pretty straightforward and easy to reason about. -- nathan --Ot5x3ffkWEuxilWO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v1-0001-convert-SISeg-maxMsgNum-to-an-atomic.patch