Andrew Dunstan <and...@dunslane.net> writes: > On 08/11/2010 09:43 AM, Tom Lane wrote: >> Andrew Dunstan<and...@dunslane.net> writes: >>> Why not just add the configured port (DEF_PGPORT) into the calculation >>> of the port to run on?
>> No, that would be just about the worst possible choice. It'd be >> guaranteed to fail in the standard scenario that you are running >> "make check" before updating an existing installation. > One of us is missing something. I didn't say to run the checks using the > configured port. I had in mind something like: > port = 0xC000 | ((PG_VERSION_NUM + DEF_PGPORT) & 0x3FFF); Oh, I see, modify the DEF_PGPORT don't just use it as-is. OK, except that I think something like the above is still pretty risky for the buildfarm, because you would still have conflicts for assorted combinations of version numbers and branch_port settings. How about just this: port = 0xC000 | (DEF_PGPORT & 0x3FFF); If anyone was actually using a DEF_PGPORT above 0xC000, this would mean that they couldn't run "make check" on the same machine as their running installation (at least not without adjusting pg_regress's port choice, which I still think we need to tweak the makefiles to make easier). But for ordinary buildfarm usage, this would be guaranteed not to conflict as long as you'd chosen nonconflicting branch_ports for all your branches and animals. Or we could do something like port = 0xC000 ^ (DEF_PGPORT & 0x7FFF); which is absolutely guaranteed not to conflict with DEF_PGPORT, at the cost of possibly shifting into the 32K-48K port number range if you had set DEF_PGPORT above 48K. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers