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 1slE8x-0068qb-2v for pgsql-general@arkaria.postgresql.org; Mon, 02 Sep 2024 20:59:23 +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 1slE8w-002MqR-AT for pgsql-general@arkaria.postgresql.org; Mon, 02 Sep 2024 20:59:22 +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.94.2) (envelope-from ) id 1slE8v-002Mn0-SZ for pgsql-general@lists.postgresql.org; Mon, 02 Sep 2024 20:59:22 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1slE8t-000LNh-5l for pgsql-general@lists.postgresql.org; Mon, 02 Sep 2024 20:59:20 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-374cacf18b1so982311f8f.2 for ; Mon, 02 Sep 2024 13:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20230601.gappssmtp.com; s=20230601; t=1725310757; x=1725915557; 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=jKtF+CrFVkAIsZzwjOjWOPPuTNnSU/QM4FFoLQBq8Ww=; b=voYWQCGBtOhtomXNUUA1N1nXATjiJCWKbvs1RwDXKzMRqlrbWOainR2uGZ5tC3q1es mDnWz6IMFZEk3S0bVq2rJ3BP+Z+bUQHUp7nMI8Vu+k/nOGS9cp+Z/13E9Q3oMy/AEWf6 m7K5BXf02IibMz/+smnkRSe4gBSE1OJQaPG1S3uvuNH78RlYOyQb9UXMClz1VSRERbbG S3PkDvArioA8/Apo/PkVc4TDvc3nQ5GJktFvsqickeWWKdnGdQ05uxP/H7bQx8LWy/D1 +INitdQ4490ZGJru6oX2UWPOo0mKZsyUyynZOcz4GLFG+KifusMbbUYuKMj4qNR/pafp Ua9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725310757; x=1725915557; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jKtF+CrFVkAIsZzwjOjWOPPuTNnSU/QM4FFoLQBq8Ww=; b=tsop/haKI2I0E4TluybUzRCdELBuhOR2SHcuSB0AM+2bckcn9aYI4Wx+JLshV3v5mH d8Z4HHjPI0+1Xwho8al/4dNVxI+mfYcMvtHPaZQvyiRqL1EVgQxI1sq0+KbjdOEvx2ji 6wU6oXqqFnqxenCL7FStSRHcJccrArOh8OoSDoJqaPvrioQQPpFmCUjT2ujcwLKN/Psn iwjcg0lP9CkIzIej16qlaTLXeVynCxWIqO1H3zCFmVF3Cg/GWY9chMYpjsTK0rNN+Akm wVnGPRVkX6ZVfFUwTPZoSP+Kd6x5LJGKPN18P0qOJ189GYBmKOvABtnrqOkJamBC/u1W XyXA== X-Forwarded-Encrypted: i=1; AJvYcCW8oIOh+/HEj+j1LYG0hNnBxNfrkSW0ZJjQx+jZ96fHu+KByMpiUsImtN90rIfHOeziDBQSl8gsNRKhyM5N@lists.postgresql.org X-Gm-Message-State: AOJu0YxRulr2PY2BAMFfAxRr3GT5Wms3PQyQg8JYLAheWiXXpJAooDAL KFhYNFI4KVllw/aE56J5GLplBoCuLZE0GECMoNWg04UkDfCrAWXpmIa/WiK8rbhwkTPGvjl1RLY ek00ZTtiMNFTevQqZUIBFiCFugngo5rty84Tn5Q== X-Google-Smtp-Source: AGHT+IF1zzHIFIR55rceaVpRMVNU4fteaKfYEJi/Ap7jRTIaGlrOmBD4zM5iBxC4SUPbvWDIfBaNy6Sns+mfPJ9fqpk= X-Received: by 2002:adf:ee03:0:b0:374:c9aa:f24d with SMTP id ffacd0b85a97d-374c9aaf425mr3222899f8f.59.1725310755777; Mon, 02 Sep 2024 13:59:15 -0700 (PDT) MIME-Version: 1.0 References: <3bda0d10-0d60-42b7-9600-abe23d54bb16@postgrespro.ru> <7bc8da54-fe4f-4ff2-aa4e-b54fc91df586@postgrespro.ru> In-Reply-To: <7bc8da54-fe4f-4ff2-aa4e-b54fc91df586@postgrespro.ru> From: Peter Geoghegan Date: Mon, 2 Sep 2024 16:58:49 -0400 Message-ID: Subject: Re: PG17 optimizations to vacuum To: Pavel Luzanov Cc: Melanie Plageman , "pgsql-generallists.postgresql.org" , Heikki Linnakangas 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 Mon, Sep 2, 2024 at 4:35=E2=80=AFPM Pavel Luzanov wrote: > If it helps, without creating index on id column, the numbers will be > much closer: Yes, avoiding all index vacuuming seems useful. It makes the test case cleaner, since we don't have to think about the variability from the TIDStore work (and from index vacuuming more generally). > master: > WAL usage: 78502 records, 22090 full page images, 196215494 bytes > > v15: > WAL usage: 77437 records, 30872 full page images, 152080268 bytes To be clear, I wouldn't be all that surprised if some issue with alignment padding and/or the new WAL format made master write more bytes of WAL total than on earlier versions. Small inefficiencies like that were always a possibility. That's not the problem that I'm principally concerned about right now. I'm most concerned about the simple fact that we're writing more individual WAL records than on previous versions, despite the fact that VACUUM does exactly the same amount of useful pruning and freezing work across versions. How could a patch that merged together the previous PRUNE and VACUUM WAL record types into a single record type actually cause an increase in the number of WAL records written? I'd have thought that that was simply impossible. --=20 Peter Geoghegan