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 1vlTlC-00Cp1P-18 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2026 15:16:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlTlB-009yzR-1C for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2026 15:16:41 +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 1vlTlB-009yzJ-07 for pgsql-hackers@lists.postgresql.org; Thu, 29 Jan 2026 15:16:41 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vlTl8-002wEL-37 for pgsql-hackers@lists.postgresql.org; Thu, 29 Jan 2026 15:16:40 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-6582e8831aeso1852494a12.1 for ; Thu, 29 Jan 2026 07:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769699798; cv=none; d=google.com; s=arc-20240605; b=CrAlMq4Dz9Mq+gWYZyxY/Ys0LgAx1LV/kqGgE4o1xLhFMyXn2VuTJ5irjO/DqNaQgn J0IO+CMnBGJE8S5ucVhigF0exjW64QPkv0DsozM2pAea6zU3CbNN/xmvm7B8+xKijQmS JWRr5BTGHaVvPTtamUR09/WJZ7xsbLIQT0ROzN1AHN1dzN7z7vcnVPrmpQ9YiZ0WUfkL E36U86Hj6KUBYdpgXlHB0lHPM+T0fknZFcL5bvzQjL6WnOVhDILxzBFXIlk6qGnPCUcp I0JZqbHRQiQ7jmD9RcaYPBlXl9iQt39pomZBxe55Gdz0j80HtN+0wU0T7cwz2hMIzvbw RcrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jbKV4nbyPg1oBOU4tiQxNcCrYbNF7HRLGjCDkYzKcXY=; fh=Fje7alSYgaGoVAMouS7gJzNMAUvumuFZtpt62fjrswk=; b=dtEzCleEbfRaLdlN884n6gDZ/y0I9IPmAs3OHjKo7YoWgjjW0MkDnB1DWTQBRPaX1F Tw/ce7d3su6cRa7cXUg+7hBcJuCrHU4t/06PU0tctfNLawQDzeLnR7SpoQuG0eTWAN7F qie6OWtbZqqbLcLdGNKj7mCkJUanF9MSG/WqfVVI1HJrdMHU09w8u4F0KKiADkxwDBfk 7XpP/GM9EUvawAqCCpbc9f9uvrPN/fmnKtMGkrw/3WbISv7I4nhomsTcmW7n9e7sOis8 UTxb5s6Vkv0AYTJp9Se10bETKhReEK/V+Irh41cH4zNwu4w7oGdW97p1E2SjYjGYBXSQ x8Uw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769699798; x=1770304598; 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=jbKV4nbyPg1oBOU4tiQxNcCrYbNF7HRLGjCDkYzKcXY=; b=VEXd/XfdI8uxUK+PGjtSPlsK5iOITzyo3r5YMxWrMYkIoNAnPl0QWwtt4vZLp1YqEQ Q7FiejuYRsyfW8ROfk0thFMgAS7Nn2Fx6GlKBf//kq9Yh6cCfL8e5P7cOaUaRpJXk0Sj kv7+wNNXQe7yLH6Sx/gCHQ5uivSMF30SSy2/ds8LjAI1/QGERRBEF7G5Q4DFGjpMr9s2 vIrQe1ZvVTIyWaqKYu/cW+zRubWopcOhBSzN7J1O0EJi/K7TnYYe76KJLPDRpjIXF52m 8JEsoDELvsCzRSkfXOe/G5ULgQUU6rbLdPAVzNM7qnweCXrwchCyFI5+W3hl5iTv1IyN e51g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769699798; x=1770304598; 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=jbKV4nbyPg1oBOU4tiQxNcCrYbNF7HRLGjCDkYzKcXY=; b=NZOllVQ1Isi3GDF6r0NXOOsI+fJ1iwFx9K4GZv3qBTylKZSAb4VTxPconuJat+YdFm mjbluNK2NvE3e6DFquKelDV528IqUYTHRch8ioNhzQUsEIGO4fND/ezXU0qGJVPu1CSA yHwj3N0RTNqF0PmmnEq6fpG8ey9d/3Gb4NxHtamiiy8lQwnh+QlfrkqnPyYFFWoo/6m7 Q0apsVqu6EJSmHfdh+J0uo864ahZn/OBdBBvQgCXqyP+CzpnC7pY4YIQMUPKlUBCeaOm DlLLVSR7zizEue7cLYc/lVf1kWUadI6ibREOdKg7KICBEthDUxk3SDqII3xF9P0AifxG M30g== X-Forwarded-Encrypted: i=1; AJvYcCVXjrx/IWwdn5AWvCwuf9YBZBaR7RP6fsYeAvQYS1AUIe3bI9slGE0NqT/YZ7SPIMqUG3XS3APavGN4hZSj@lists.postgresql.org X-Gm-Message-State: AOJu0Yxhxws7wsdKZDkKxAe+itoMTUI59CojQ3DO7o0jRdvjNzPk+Yzm WoIR+IGpWNmQyzT/hHGyjvlqCZZOfJ2SQWRHi3w05lh9YVRx8Z/zUTzi/dbLgJ5fOwqtad6IAW+ j/vyyXW5IrrM8pAMGj09j23vS7bUGOBM= X-Gm-Gg: AZuq6aKbwX38SBOdBnGBOdsaVefm3LbqZSnAeGRB+V1h5p4NDJr0BCFcqqq85xq0gsP YNyYWdUY4lKZb5vdVwbJsI8ornrzVdLJWKWGaHLNrb2MMd35kqGo2fv3imy7mLTW0QShYOarTx6 Nm9Lm2f0IPXoFqFeEq8Gqk9Ob27F8pJ8lBS2vuXLfWu6FVB8D2TW6KN041DakGsFz10Bzajvs4F mMEDxtbwpUFKFB3bu8HADA0OX+qOucO0mhBIlXVn0EvcIK9IUF6yL9/tJvlInmlwshB5QJ7Z8nt c6xSjo5Nj9LqKjsPazNJqplIbUew X-Received: by 2002:a05:6402:52d2:b0:658:afe9:a20c with SMTP id 4fb4d7f45d1cf-658afe9a466mr4347006a12.29.1769699798067; Thu, 29 Jan 2026 07:16:38 -0800 (PST) MIME-Version: 1.0 References: <6BC5DBAB-6084-4BB8-8450-52E9648AB021@gmail.com> <7F5BCD7A-764D-4D8D-8E27-6F2CAAEA1CEE@gmail.com> <4379FDA3-9446-4E2C-9C15-32EFE8D4F31B@yandex-team.ru> <7ib3sa55sapwjlaz4sijbiq7iezna27kjvvvar4dpgkmadml6t@gfpkkwmdnepx> <2b09fba6-6b71-497a-96ef-a6947fcc39f6@gmail.com> In-Reply-To: From: Melanie Plageman Date: Thu, 29 Jan 2026 10:16:26 -0500 X-Gm-Features: AZwV_QgOKG-30ZZboxzbujYlwQq6sCUMd-tIj1UB_uiVa4fAEFhtoHPC2o8s2CU Message-ID: Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) To: Kirill Reshke Cc: Alexander Lakhin , Andres Freund , Andrey Borodin , Chao Li , Xuneng Zhou , Robert Haas , PostgreSQL Hackers , 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 Thu, Jan 29, 2026 at 8:39=E2=80=AFAM Kirill Reshke wrote: > > Thanks Alexander! > This is a good and detailed report, I was able to reproduce this. Thanks to both of you for looking into it! > I have added some logs to my copy of postgres with your patch and I > think problem causing this test to fail is this sequence: > > 1) Autovacuum starts, does its deeds, and acquiring xid =3D 118518 So, in this scenario, is the issue that autovacuum runs before vacuum freeze? If so, we can change the table DDL to: create table test_vac_unmodified_heap(a int) with (autovacuum_enabled =3D f= alse); which would prevent the autovacuum from running. Unless there is some other way for one of the other tests to hold OldestXmin back to before the xid of the insert. But I don't see how. > 2) insert into test_vac_unmodified_heap values (1); executes and > commits with xid =3D 118519 (from my log) > 3) vacuum freeze starts and computes cutoff xid =3D 118518, because > oldest xmin is 118518 from (1) > > *and we cannot freeze tuple* - Melanie