Small request re error message

Started by Scott Ribeabout 19 years ago7 messagesgeneral
Jump to latest
#1Scott Ribe
scott_ribe@killerbytes.com

Could the below message be modified:

The database cluster was initialized with PG_CONTROL_VERSION 906166272, but
the server was compiled with PG_CONTROL_VERSION 822.

By also showing the version numbers in hex, like so:

The database cluster was initialized with PG_CONTROL_VERSION 906166272
(0x36030000), but the server was compiled with PG_CONTROL_VERSION 822
(0x00000336).

This would have saved me a couple of minutes' worth of puzzlement. With Macs
out there that look identical between the PPC and x86 versions, this kind of
error has gotten a lot easier to make ;-)

--
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice

#2Bruce Momjian
bruce@momjian.us
In reply to: Scott Ribe (#1)
Re: Small request re error message

Scott Ribe wrote:

Could the below message be modified:

The database cluster was initialized with PG_CONTROL_VERSION 906166272, but
the server was compiled with PG_CONTROL_VERSION 822.

By also showing the version numbers in hex, like so:

The database cluster was initialized with PG_CONTROL_VERSION 906166272
(0x36030000), but the server was compiled with PG_CONTROL_VERSION 822
(0x00000336).

This would have saved me a couple of minutes' worth of puzzlement. With Macs
out there that look identical between the PPC and x86 versions, this kind of
error has gotten a lot easier to make ;-)

I don't understand how the hex values help.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#3Bill Moran
wmoran@collaborativefusion.com
In reply to: Bruce Momjian (#2)
Re: Small request re error message

In response to Bruce Momjian <bruce@momjian.us>:

Scott Ribe wrote:

Could the below message be modified:

The database cluster was initialized with PG_CONTROL_VERSION 906166272, but
the server was compiled with PG_CONTROL_VERSION 822.

By also showing the version numbers in hex, like so:

The database cluster was initialized with PG_CONTROL_VERSION 906166272
(0x36030000), but the server was compiled with PG_CONTROL_VERSION 822
(0x00000336).

This would have saved me a couple of minutes' worth of puzzlement. With Macs
out there that look identical between the PPC and x86 versions, this kind of
error has gotten a lot easier to make ;-)

I don't understand how the hex values help.

With the hex values, it becomes immediately obvious that the problem is
caused by endianess (to me, anyway)

--
Bill Moran
Collaborative Fusion Inc.

#4Bruce Momjian
bruce@momjian.us
In reply to: Bill Moran (#3)
Re: Small request re error message

Bill Moran wrote:

In response to Bruce Momjian <bruce@momjian.us>:

Scott Ribe wrote:

Could the below message be modified:

The database cluster was initialized with PG_CONTROL_VERSION 906166272, but
the server was compiled with PG_CONTROL_VERSION 822.

By also showing the version numbers in hex, like so:

The database cluster was initialized with PG_CONTROL_VERSION 906166272
(0x36030000), but the server was compiled with PG_CONTROL_VERSION 822
(0x00000336).

This would have saved me a couple of minutes' worth of puzzlement. With Macs
out there that look identical between the PPC and x86 versions, this kind of
error has gotten a lot easier to make ;-)

I don't understand how the hex values help.

With the hex values, it becomes immediately obvious that the problem is
caused by endianess (to me, anyway)

Oh. Yea, I can see that, but even if the endian-ness is the same, it
still might not work. Even a different compiler flag will cause a
failure to run properly.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#5Scott Ribe
scott_ribe@killerbytes.com
In reply to: Bruce Momjian (#4)
Re: Small request re error message

Oh. Yea, I can see that, but even if the endian-ness is the same, it
still might not work. Even a different compiler flag will cause a
failure to run properly.

Sure. You can't flag every possible error. But my Intel & PPC Macs look
identical, and I compile with identical flags. So it would help people like
me, all one or two of us ;-)

--
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 722-0567 voice

#6Bruce Momjian
bruce@momjian.us
In reply to: Scott Ribe (#5)
Re: Small request re error message

Scott Ribe wrote:

Oh. Yea, I can see that, but even if the endian-ness is the same, it
still might not work. Even a different compiler flag will cause a
failure to run properly.

Sure. You can't flag every possible error. But my Intel & PPC Macs look
identical, and I compile with identical flags. So it would help people like
me, all one or two of us ;-)

What would make more sense than printing the hex is to print a specific
message if the endian-ness doesn't match, but I am worried people might
assume it will work when the endian does match.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#7Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#6)
Re: Small request re error message

Bruce Momjian wrote:

Scott Ribe wrote:

Oh. Yea, I can see that, but even if the endian-ness is the same, it
still might not work. Even a different compiler flag will cause a
failure to run properly.

Sure. You can't flag every possible error. But my Intel & PPC Macs look
identical, and I compile with identical flags. So it would help people like
me, all one or two of us ;-)

What would make more sense than printing the hex is to print a specific
message if the endian-ness doesn't match, but I am worried people might
assume it will work when the endian does match.

That doesn't make much sense because we give different error messages,
each telling that one little check failed.

I think adding the hex code is not helpful in the general case, but
maybe we could check for endianness if the control version fails, and
add that info in a HINT or something.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support