pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Maciek Sakrejda <m.sakrejda@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Date: Thu, 04 Aug 2022 20:21:26 -0400
Message-ID: <3696676.1659658886@sss.pgh.pa.us> (raw)
In-Reply-To: <71BB0D91-0308-4134-BCDB-4D2567B27569@anarazel.de>
References: <CA+TgmoZHDwEjPHO6RceWZZ5L1FeJ4_VEi0t39rnWFBAbnoq53w@mail.gmail.com>
	<CAFiTN-tSUj56cyS6a88sgn3MWJBOA_VjEQfc7fZmWicKwijraA@mail.gmail.com>
	<CA+TgmoYVDLtS0v6XNTk=xBVStjZu_XaS5FTY74neb_h8YOcF0w@mail.gmail.com>
	<CA+TgmobUW9NQK7EJkV_0F87bqqq5BSHKiX2+wfthLcy4qA7YvQ@mail.gmail.com>
	<20220802175043.GA13682@telsasoft.com>
	<CA+TgmobZufK6PcCRpvjP6dJqOBO-woWZF0cqMHWGvzkbgeaBKw@mail.gmail.com>
	<2767668.1659476794@sss.pgh.pa.us>
	<20220802220416.GC13682@telsasoft.com>
	<20220802222334.umf5wsa2r63koppn@awork3.anarazel.de>
	<CAFiTN-sG9-ocJFN+KBAQ2mTuF-9Ja+i1Qo81yqr0WDOsqqYpLg@mail.gmail.com>
	<CAFiTN-sL8M+Z6nongs=rSqfP26Vr0O_EYLfcwbO-Emz1GYxtxA@mail.gmail.com>
	<CAFiTN-v4u2WJT6y1n4wtM4Z3tffJonT7zuRKegYao9p-Oyb07Q@mail.gmail.com>
	<CAFiTN-thCGvRF0_WftbDc0KFagB3vgHHGrpNdRMJ6vtkObEMoA@mail.gmail.com>
	<CA+Tgmoa9Heqc3mr=viBQ0Y0tqQz5G8oUAc23ZmbNW5__cud28A! ! ! @mail.gmail.com>
	<3663919.1659650570@sss.pgh.pa.us>
	<3679800.1659654066@sss.pgh.pa.us>
	<3681339.1659654673@sss.pgh.pa.us>
	<71BB0D91-! 0308-4134-BCDB-4D2567B27569@anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On August 4, 2022 4:11:13 PM PDT, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> [pile^2]  Also, what is the rationale for locking the target buffer
>> but not the source buffer?  That seems pretty hard to justify from
>> here, even granting the assumption that we don't expect any other
>> processes to be interested in these buffers (which I don't grant,
>> because checkpointer).

> I'm not arguing it's good or should stay that way, but it's probably okayish that checkpointer / bgwriter have access, given that they will never modify buffers. They just take a lock to prevent concurrent modifications, which RelationCopyStorageUsingBuffer hopefully doesn't do. 

I'm not arguing that it's actively broken today --- but AFAIR,
every other access to a shared buffer takes a buffer lock.
It does not seem to me to be very future-proof for this code to
decide it's exempt from that rule, without so much as a comment
justifying it.  Furthermore, what's the gain?  We aren't expecting
contention here, I think.  If we were, then it probably *would* be
actively broken.

			regards, tom lane





view thread (283+ messages)  latest in thread

Message-ID: <3696676.1659658886@sss.pgh.pa.us>
Permalink:  ../3696676.1659658886@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3696676.1659658886@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, andres@anarazel.de, robertmhaas@gmail.com, dilipbalaut@gmail.com, pryzby@telsasoft.com, ashu.coek88@gmail.com, m.sakrejda@gmail.com, bruce@momjian.us, alvherre@alvh.no-ip.org, andrew@dunslane.net, hlinnaka@iki.fi, pgsql-hackers@lists.postgresql.org, thomas.munro@gmail.com
  Subject: Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
  In-Reply-To: <3696676.1659658886@sss.pgh.pa.us>

* 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