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 1vgKhk-00B2LM-2X for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 10:35:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgKhk-00GOGT-01 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 10:35:52 +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.96) (envelope-from ) id 1vgKhj-00GOGL-2H for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 10:35:51 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgKhi-000bML-0J for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 10:35:51 +0000 Received: by mail-qt1-x843.google.com with SMTP id d75a77b69052e-4eda6a8cc12so9683821cf.0 for ; Thu, 15 Jan 2026 02:35:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768473348; x=1769078148; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KncI+CPpm1V+1yPOga2Mc+q5Bn3bGdOmQ7jcSHensNk=; b=BDjxzs6voh3gM0eJBNQ7TzOZg0QWhSRwIjmkwFIjVtJqCQ1YR5jvGrCQwb4TEEGcmj tUWKkpgj6T6zLdK4T58ky/bPuA0r41UsSxLD1pBmJXbvXvVZkW1Q9VsBQXdUsQQs8hvO sW+0vv8jdvgo8Acu6BaXCbqtwO7hcZr9vr62+RqamOJW27dGsD8Q9fm0iLEIzhmw/doy 01W/+MqhA917FOqlWlahqbYwvMa/VCgiyNobYzn5p3sAIuLS8hhruQ2e37gUIp8epYXj Vn2Jy/v2vKu2/SdMpNLaCBNe1z0XQmaAhxjQ+++uSzp6C13FIsaPvd8EIH0yfwZEE439 uYAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768473348; x=1769078148; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=KncI+CPpm1V+1yPOga2Mc+q5Bn3bGdOmQ7jcSHensNk=; b=qZlKt82YO5XsTc9JyuqV8Weq8dCE8sVB/+sPwev2bEnSFuh4x347vXojAjbz2zvPgf CbSnSAm/VayBck4Ht+OpB75t4LuOLLKPrwXxIZHhw4RXTyDxUm0uschfGDEoWQERx7WT aBDdp76Ews/q+5LRK10ZBTp70BfE/uXmouV6/WSpr78HIETPKX6P1rBVgTkrqebR/eIs NyNVALduGUmACct/4G/cyfX9aYMjjQ7tXjW/+I4QPBwCfzWSYoe1+3PIV7/NNWLWv9K9 mnJFZ0GHfyZXlnEJM9Et53liLD5MSk6tKCxeE7zkxqgi4ABvk+8z5IsxCCyNXKytHhDB Lzow== X-Forwarded-Encrypted: i=1; AJvYcCUVj7UehVorcu1ozvq4lj99Qm31/9l+miyP/IsQ03FXeG7e7sgWaseYcZt4mzU85hpYAqKGLwx8XdHJrjUQ@lists.postgresql.org X-Gm-Message-State: AOJu0YypqjesB/aDpePx+WjRWBoSPF9zmYQTR2T6h2m/u+8pEG2Trap6 L2bTor2MrZCAQSRlqhl8lZaZez8O5nUE8IYN4KZ+Qs2iJHw3OL5yn2n4YowP9lhu89f/2K2DtRi Me4wObgFDT5l2OWtoUrk+N4cSHxLyCLE= X-Gm-Gg: AY/fxX4uI+FbRLFvqaEYHRtfC0W6UQqZBurft7OBMYi7VwZCVJd7YxcfI9kH5vl+Px9 jKFC3q3qlDsk7oo5vTiIGpqqJBVsSllc1qmnjth6R3HmaRC4sMZZaHdChZXxMBJsPjzJHsjT7is dF0aSZRx8BwzqxO2oMDkcX/k1lsUMPH+AB7GbVChDuuyfZzkNjgOrJCCPLnVLWYkFZGC4eC0VT5 q2Vb+GedBKbos+qjIBJkufhbBI9LygK+l4T+oRM9XJETSNvdmCf8rHawR/VgnLGc8Tciq8rzMUB dSTGiRpWjdwu+AzcayTWCFAFffKac53Sdh3JcqC3bi6ZJ/YWsv5b+9WWsUpBBY1/iKrHtt52JDq icjAxKmQQ2lmU6J0= X-Received: by 2002:ac8:5d4c:0:b0:4ee:4656:54f6 with SMTP id d75a77b69052e-5014a9d1ae0mr63923301cf.84.1768473347670; Thu, 15 Jan 2026 02:35:47 -0800 (PST) MIME-Version: 1.0 References: <20250911054220.3784-1-root@ip-172-31-36-228.ec2.internal> <0be1b7b05726652ea0d83e8f72fd4cfe@postgrespro.ru> In-Reply-To: <0be1b7b05726652ea0d83e8f72fd4cfe@postgrespro.ru> From: John Naylor Date: Thu, 15 Jan 2026 17:35:36 +0700 X-Gm-Features: AZwV_QjA9siuOZXP9NrzDaP4Y0w-iAXrPHes-jX2zqWRT-_RRLaxlCpaYRWVJBE Message-ID: Subject: Re: Proposal for enabling auto-vectorization for checksum calculations To: Oleg Tselebrovskiy Cc: Andrew Kim , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jan 15, 2026 at 3:04=E2=80=AFPM Oleg Tselebrovskiy wrote: > > So in v10 I separated the body of checksum_block to > > a semi-private header to provide hardware-specific definitions > > for core code, while also maintaining the same one that > > external code expects > > I like the usage of a semi-internal header, less code duplication > is always good Glad to hear it. > If I understand correctly, with how code is currently, > external programms can define PG_CHECKSUM_INTERNAL manually, > but then they won't have access to static functions inside of > checksum.c, so all you get is a pointer that leads nowhere, correct? Sounds right, but I'm not sure why an external program would define it, because it's named...drumroll.."internal". > I'd like to think that speeding up checksum calculation is something > that some external programms could appreciate. External programs are probably doing some one-off task, so I don't see a reason to work harder. > Also, not moving all those checksum files to src/port saves us from > thinking about problems with meson and current external programs, > but, I think, that after hardware checks are refactored, we could > revisit the question of moving checksum[_impl].h/.c to src/port. Refactoring the hardware checks is not going to make those two problems go away, and I don't understand why you want to move anything to begin with. -- John Naylor Amazon Web Services