Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone? - Fixed!

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mitch Vincent" <mitch(at)venux(dot)net>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone? - Fixed!
Date: 2000-11-13 05:21:35
Message-ID: 5455.974092895@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Mitch Vincent" <mitch(at)venux(dot)net> writes:
> It wasn't PostgreSQL, it was me of course!
> Seeing as it was so long ago, I forgot that the BLCKSZ on the production
> server wasn't 32k, it was 31k (for whatever reason).. When I set the BLCKSZ
> lower than that and tried to start the backend it told me that the database
> was initialized with a BLCKSZ of 31k, strange that it didn't say that when I
> compiled with a BLCKSZ of 32k but regardless of all that it was my stupidity
> that was the problem, nothing more..

Hmm, there is a test specifically designed to catch this mistake in
backend/access/transam/xlog.c: the initdb-time BLCKSZ is stored in
pg_control, and we have

if (ControlFile->blcksz != BLCKSZ)
elog(STOP, "database was initialized with BLCKSZ %d,\n\tbut the backend was compiled with BLCKSZ %d.\n\tlooks like you 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 :-(

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-11-13 05:34:51 Re: [HACKERS] 7.0.2 -> 7.0.3 problem - anyone? - Fixed!
Previous Message Michael Fork 2000-11-13 04:38:17 PHPBuilder article -- Postgres vs MySQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-11-13 05:33:46 Re: PostgreSQL virtual hosting support
Previous Message Michael Fork 2000-11-13 04:38:17 PHPBuilder article -- Postgres vs MySQL