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: Chao Li <li.evan.chao@gmail.com>
Cc: Kirill Reshke <reshkekirill@gmail.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Melanie Plageman <melanieplageman@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)
Date: Thu, 15 Jan 2026 18:19:41 -0500
Message-ID: <938362.1768519181@sss.pgh.pa.us> (raw)
In-Reply-To: <oauakayi2ksyaavz2ounpns47qei5q2kguya4ocfmvjyr45ctc@qqb6b7gjttwi>
References: <kjdgvws34gpnz4y6xu5aaeul5mspgy3ahvyiw4lndb3ecsacdb@b2ccyowotpqh>
	<jtg5cu4n6h5lib3kzx66ju4yhh6kmviaud7oq6dtut6c4q4rdi@xwsfoagt3c2b>
	<9C2494E1-F446-42DF-B070-7E231B8E6221@gmail.com>
	<vrnib3bf726ht72jlccu252qm65lzexutydtagytstsjszpiya@ece6xi7o4nfx>
	<F6A52B41-2FFA-4592-BD9B-0438F610B6A2@gmail.com>
	<cj5mcjdpucvw4a54hehslr3ctukavrbnxltvuzzhqnimvpju5e@cy3g3mnsefwz>
	<58821140-0182-4FF3-9A4F-5B168DDB9243@gmail.com>
	<732580B4-962F-4EBD-8811-F4667D79747D@gmail.com>
	<wat7azo4hpgux7ptvozfedtw6hnz7pih3vvnfipxdlcci6fuf3@wacut36qcac7>
	<934395.1768518154@sss.pgh.pa.us>
	<oauakayi2ksyaavz2ounpns47qei5q2kguya4ocfmvjyr45ctc@qqb6b7gjttwi>

Andres Freund <andres@anarazel.de> writes:
> Can't quite decide between just using always_inline - after all the buffer
> locking really is a rather crucial code path - and just initializing
> wait_event to 0. Either seems better than using a default:.

Yeah, I agree with not using a default: in case we ever extend
the mode enum.  I'd be inclined to fix it like this:

 			case BUFFER_LOCK_UNLOCK:
 				pg_unreachable();
+				/* silence possible compiler warning: */ 
+				wait_event = 0;
  		}

			regards, tom lane





view thread (120+ messages)  latest in thread

Message-ID: <938362.1768519181@sss.pgh.pa.us>
Permalink:  ../938362.1768519181@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/938362.1768519181@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, li.evan.chao@gmail.com, reshkekirill@gmail.com, hlinnaka@iki.fi, melanieplageman@gmail.com, boekewurm+postgres@gmail.com, thomas.munro@gmail.com, noah@leadboat.com, robertmhaas@gmail.com, michael.paquier@gmail.com
  Subject: Re: Buffer locking is special (hints, checksums, AIO writes)
  In-Reply-To: <938362.1768519181@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