Re: 7.0.2 -> 7.0.3 problem - anyone? - Fixed!
От | Tom Lane |
---|---|
Тема | Re: 7.0.2 -> 7.0.3 problem - anyone? - Fixed! |
Дата | |
Msg-id | 5536.974093691@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: 7.0.2 -> 7.0.3 problem - anyone? - Fixed! (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
I said: > if (ControlFile->blcksz != BLCKSZ) > elog(STOP, "database was initialized with BLCKSZ %d,\n\tbut the backend was compiled with BLCKSZ %d.\n\tlooks likeyou need to initdb.", ControlFile-> blcksz, BLCKSZ); > But I haven't stress-tested it. From your report, it sounds like > something may blow up before control gets to this point if the compiled > BLCKSZ is larger than the value used by initdb :-( Oh ... duh! Three statements before the above test, we read in the pg_control data with if (read(fd, ControlFile, BLCKSZ) != BLCKSZ) elog(STOP, "Read(\"%s\") failed: %d", ControlFilePath, errno); Now pg_control is only a one-block file anyway. So if it was written with a smaller BLCKSZ than the backend is expecting, the read() will indeed not read as many bytes as the code is expecting --- whereupon it fails with this not-so-informative error message instead of the one that would be useful. Easy to fix, now that we've had our noses rubbed in the problem. Thanks for the report, and sorry you were confused for awhile... regards, tom lane
В списке pgsql-hackers по дате отправления: