pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Jeff Davis <pgsql@j-davis.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: John Naylor <john.naylor@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: New strategies for freezing, advancing relfrozenxid early
Date: Sat, 31 Dec 2022 11:46:15 -0800
Message-ID: <ebc857107fe3edd422ef8a65191ca4a8da568b9b.camel@j-davis.com> (raw )
In-Reply-To: <CAH2-WzkdMG2RjOnQxwgN8VWAz404xeLjrLteiXnN=-EMQmq_dg@mail.gmail.com >
References: <CAH2-WznREt2q3P+D7bq4b0ytG_z6EOQUPNyoLB+CtEactZJPiA@mail.gmail.com >
<d0480c1e584150863fdecd9f83ed56a8b4e88a72.camel@j-davis.com >
<CAH2-WzmXErgxLmYrz9M90D79VjGq4OU8Fp52ECrqRyN_OF=f+A@mail.gmail.com >
<CAH2-Wzn6dhY3M4MomiABKZDxVC4m=7ub3A8cy3_13j2pJTv1=w@mail.gmail.com >
<CAH2-WzkU42GzrsHhL2BiC1QMhaVGmVdb5HR0_qczz0Gu2aSn=A@mail.gmail.com >
<20221111034455.GE16809@telsasoft.com >
<CAH2-Wz=-7_epivYdWN9F899iKKfgQ+zj8Myi7ZwBqMVsegRNJQ@mail.gmail.com >
<20221116052023.xg7pwgvx2t3hrgaj@awork3.anarazel.de >
<CAH2-Wzm_=mrWO+kUAJbR_gM_6RzpwVA8n8e4nh3dJGHdw_urew@mail.gmail.com >
<CAH2-WznS9TxXmz2_=SY+SyJyDFbiOftKofM9=aDo68BbXNBUMA@mail.gmail.com >
<20221206184255.dphhpvsyovqqwfdd@awork3.anarazel.de >
<CAH2-WznWcWn8FKE+oRqzf0XYx60uKmLmbPDh2VworajzJSVvuw@mail.gmail.com >
<CAH2-Wzn9KRf3rBSDkYsK3tvW2JegLfqCCG2Kwi4Ay9QVmhwPSA@mail.gmail.com >
<9fd17e87889845d74b8e3fdac7d2748a07950a92.camel@j-davis.com >
<CAH2-WzkvBdD13T+O1NFv97Pt-_kL3NxiAA9JZ5-nAFZS2xuZSA@mail.gmail.com >
<CAFBsxsGdfm5ot-GhgwF0YY8QyAjSZo5QtpeTDv4CSxbm7MfJbA@mail.gmail.com >
<CAH2-Wzng9JWoF4qUY2V37bfa2kogi8=GJO6B_bTfv3qaSGAhCw@mail.gmail.com >
<CAH2-WznQYscQth-0E+0CENhYF8_2_AKk4GWwhwiEnQ44xzhaww@mail.gmail.com >
<CAEze2WgrnTw2FmdPSGKoxaEDRrZ36aiz8C6=8P=stqZ2MjftDA@mail.gmail.com >
<CAH2-Wzk51g2=LvVxqKdhboLpPb2x4Coy4NJwh5mnQWcwV9e1gg@mail.gmail.com >
<CAH2-WzmjHQJ7pbdO4BtWVJ6CLG-Mp9CNe914WUJdiScOTNRKRw@mail.gmail.com >
<68df596638f60989cc72680d7029f0d51ca8cc19.camel@j-davis.com >
<CAH2-WzksXKMS=Nt7kHzZdnpXeQ6yTOLzbyL-qCUbGcZruqnm3w@mail.gmail.com >
<CAH2-WzmF9UVWv9Nmm3dhP7WS4=-qQSQRM-Jn2-NSr6z=sDsv3g@mail.gmail.com >
<a15cd7f9ca70a35b61faa38eccea9a7d41bdb3c2.camel@j-davis.com >
<CAH2-Wz=2w=qKxstssafra3bcEkjC_PRyT7w6VQAp-1MY7SazLQ@mail.gmail.com >
<CAH2-WznkNNj9hHTQUR4voNsSW7PKQzrjBe6DF0iCOUec+dU6Lg@mail.gmail.com >
<CAH2-WzkTThXif2rcMLcBTqZNYLeJe-6dVVVC_SaTDWYTC3gdPg@mail.gmail.com >
<acb89d4554f072f9dd30f2ae5b8b60092f3eb7c9.camel@j-davis.com >
<CAH2-Wz=_yTvC-kj7VonSOqonkbE4JkCOQ+swn6R8S7khe7WAYQ@mail.gmail.com >
<CAH2-WzkdMG2RjOnQxwgN8VWAz404xeLjrLteiXnN=-EMQmq_dg@mail.gmail.com >
On Fri, 2022-12-30 at 16:58 -0800, Peter Geoghegan wrote:
> Following the path of freezing a page is *always* valid, by
> definition. Including when there are zero freeze plans to execute, or
> even zero tuples to examine in the first place -- we'll at least be
> able to perform nominal freezing, no matter what.
This is a much clearer description, in my opinion. Do you think this is
already reflected in the comments (and I missed it)?
Perhaps the comment in the "if (tuples_frozen == 0)" branch could be
something more like:
"We have no freeze plans to execute, so there's no cost to following
the freeze path. This is important in the case where the page is
entirely frozen already, so that the page will be marked as such in the
VM."
I'm not even sure we really want a new concept of "nominal freezing". I
think you are right to just call it a degenerate case where it can be
interpreted as either freezing zero things or not freezing; and the
former is convenient for us because we want to follow that code path.
That would be another good way of writing the comment, in my opinion.
Of course, I'm sure there are some nuances that I'm still missing.
--
Jeff Davis
PostgreSQL Contributor Team - AWS
view thread (140+ messages) latest in thread
Message-ID: <ebc857107fe3edd422ef8a65191ca4a8da568b9b.camel@j-davis.com>
Permalink: ../ebc857107fe3edd422ef8a65191ca4a8da568b9b.camel@j-davis.com/
Also on: postgresql.org/message-id/ebc857107fe3edd422ef8a65191ca4a8da568b9b.camel@j-davis.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com, pg@bowt.ie, boekewurm+postgres@gmail.com, john.naylor@enterprisedb.com, andres@anarazel.de, pryzby@telsasoft.com, pgsql-hackers@lists.postgresql.org
Subject: Re: New strategies for freezing, advancing relfrozenxid early
In-Reply-To: <ebc857107fe3edd422ef8a65191ca4a8da568b9b.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox