Re: Review of Refactoring code for sync node detection

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Jim Nasby <jim(at)nasby(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review of Refactoring code for sync node detection
Date: 2014-10-30 21:59:23
Message-ID: 5452B4BB.8020704@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/30/14, 8:05 AM, Michael Paquier wrote:
>> This switches from using a single if() with multiple conditions &&'d
>> together to a bunch of if() continue's. I don't know if those will perform
>> the same, and AFAIK this is pretty performance critical.
> Well, we could still use the old notation with a single if(). That's
> not much complicated to change.

I actually prefer the multiple if's; it reads a LOT cleaner. I don't know what the compiler will do with it though.

If we stick with this version I'd argue it makes more sense to just stick the sync_node = and priority = statements into the if block and ditch the continue. </nitpick>
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-10-30 22:03:27 Re: pg_background (and more parallelism infrastructure patches)
Previous Message Tom Lane 2014-10-30 21:55:45 Re: TAP test breakage on MacOS X