Re: Buffer locking is special (hints, checksums, AIO writes) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Buffer locking is special (hints, checksums, AIO writes)
Date
Msg-id 938362.1768519181@sss.pgh.pa.us
Whole thread Raw
In response to Re: Buffer locking is special (hints, checksums, AIO writes)  (Andres Freund <andres@anarazel.de>)
Responses Re: Buffer locking is special (hints, checksums, AIO writes)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Buffer locking is special (hints, checksums, AIO writes)
Next
From: Michael Paquier
Date:
Subject: Re: Extended Statistics set/restore/clear functions.