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 1rdzak-008lqJ-P5 for pgsql-hackers@arkaria.postgresql.org; Sat, 24 Feb 2024 21:29:55 +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 1rdzah-005uAe-3r for pgsql-hackers@arkaria.postgresql.org; Sat, 24 Feb 2024 21:29:51 +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 1rdzaf-005uAV-Ea for pgsql-hackers@lists.postgresql.org; Sat, 24 Feb 2024 21:29:51 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rdzab-000jiU-3T for pgsql-hackers@postgresql.org; Sat, 24 Feb 2024 21:29:49 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 033C63200A09; Sat, 24 Feb 2024 16:29:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 24 Feb 2024 16:29:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1708810179; x=1708896579; bh=wD/LmMaKje 0YEhi1FldWPbR81ZgUhSTlwWei8pIGfFE=; b=K+ABrHi2dUW4+FYMQ8HuCBphjB qQjWlc0e0RAYBxmFhagZT+n/neHSKeYey2kLjV+b8cZNDcuqqEsNqIrAMbg1wWJk xz/IhRhOC+GG2Pf5K1ouY0Zob9gruBa/XNAD3ut1YbZClgmyK5KQA9AMbHlEQuUC sTetnhfffXwCv6xLtOVClLYRaEID3WRVhfF1zZYNeqc3DC/37uzD/XRcJpoWLMSa F55rJNxVlesRm5S+tIaQ9a0Z4OWPXFvLQO0tBOr4Ya+s/Tyy1pBBV9BanwY3Qgyi Au5NMQorXA7+Mv/OLj2vAP8L7LpqJk1cnx6BLnIQEkDH2DtOJ8UCr2F17vfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708810179; x=1708896579; bh=wD/LmMaKje0YEhi1FldWPbR81ZgU hSTlwWei8pIGfFE=; b=SNGoRGeblCa8L69uvgo3fKWEVm9GcVgvMF7tULNg/KAq OzuGBblKfmLjuZ2ACR3fHXj8JWKIBW1yJ0JxYbiICcjjIoh5RAlAJrCJW5qv7Ktu b0hNZl4QCH6hvXS3B3DqUsIPk5OGJ37GQs9WttpZW60hbMddYQIo51QMBccCmF43 U35hTbCYSJfol3AnoFZlIYKEZ0hDy3NHCXQrryi1VaI1KMgaqlQ1n+O4vQAGMr2o 89gSwDeiEYK26y7jfYllFGaLsPhVIlZSO/hvNLasy0/H9OSqfkhyYlZ18MxQqV+T 6hZgjBV3Tmn3wCaA5q4EVQ9dFr/2SmEaAFeJO+JPUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfeekgddugeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepfedtudeiheeivddtfeejtefhgeehheeggfekjeevvefgledutedvhedv vdeuveetnecuffhomhgrihhnpehisghmrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 24 Feb 2024 16:29:38 -0500 (EST) Date: Sat, 24 Feb 2024 13:29:36 -0800 From: Andres Freund To: Noah Misch Cc: Thomas Munro , Heikki Linnakangas , Peter Smith , Robert Haas , vignesh C , pgsql-hackers , Melanie Plageman Subject: Re: Relation bulk write facility Message-ID: <20240224212936.f3zcbs24f7oaapm4@alap3.anarazel.de> References: <20231119000416.fuyrbo6av7dytmf6@awork3.anarazel.de> <93e91b02-e07f-4205-8de6-3942b91760cb@iki.fi> <98832b4f-441f-4691-b9d4-9725eea8aed9@iki.fi> <6db39a5e-67ab-495d-9dfb-38b596df0d58@iki.fi> <20240224172345.32@rfd.leadboat.com> <20240224195024.af@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240224195024.af@rfd.leadboat.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-02-24 11:50:24 -0800, Noah Misch wrote: > > We see this happen with both xlc and gcc (new enough to know how to do > > this). One idea would be that the AIX *linker* is unable to align it, > > as that is the common tool-chain component here (and unlike stack and > > heap objects, this scope is the linker's job). There is a > > pre-existing example of a zero-buffer that is at file scope like that: > > pg_prewarm.c. Perhaps it doesn't get tested? > > > > Hmm. > > GCC docs do say "For some linkers, the maximum supported alignment may be very > very small.", but AIX "man LD" says "data sections are aligned on a boundary > so as to satisfy the alignment of all CSECTs in the sections". It also has -H > and -K flags to force some particular higher alignment. Some xlc manual [1] states that n must be a positive power of 2, or NIL. NIL can be specified as either __attribute__((aligned())) or __attribute__((aligned)); this is the same as specifying the maximum system alignment (16 bytes on all UNIX platforms). Which does seems to suggest that this is a platform restriction. Let's just drop AIX. This isn't the only alignment issue we've found and the solution for those isn't so much a fix as forcing everyone to carefully only look into one direction and not notice the cliffs to either side. Greetings, Andres Freund [1] https://www.ibm.com/docs/en/SSGH2K_13.1.2/com.ibm.compilers.aix.doc/proguide.pdf