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:32:28 -0400
Message-ID: <3699205.1659659548@sss.pgh.pa.us> (raw)
In-Reply-To: <C3458199-FEDD-4356-865A-08DFAA5D4065@anarazel.de>
References: <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>
	<20220804231204.kcr6sfpshzvt5qi3@awork3.anarazel.de>
	<3684408.1659655216@sss.pgh.pa.us>
	<C3458199-FEDD-4356-865A-08DFAA5D4065@anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> Is there a good reason to rely on P_NEW at all? Both from an efficiency
> and robustness POV it seems like it'd be better to use smgrextend to
> bulk extend just after smgrcreate() and then fill s_b u using RBM_ZERO
> (or whatever it is called).  That bulk smgrextend would later be a good
> point to use fallocate so the FS can immediately size the file
> correctly, without a lot of pointless writes of zeroes.

Hmm ... makes sense.  We'd be using smgrextend to write just the last page
of the file, relying on its API spec "Note that we assume writing a block
beyond current EOF causes intervening file space to become filled with
zeroes".  I don't know that we're using that assumption aggressively
today, but as long as it doesn't confuse the kernel it'd probably be fine.

			regards, tom lane





view thread (283+ messages)  latest in thread

Message-ID: <3699205.1659659548@sss.pgh.pa.us>
Permalink:  ../3699205.1659659548@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3699205.1659659548@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: <3699205.1659659548@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