Обсуждение: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

Поиск
Список
Период
Сортировка

BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
"Etienne Robillard"
Дата:
The following bug has been logged online:

Bug reference:      5937
Logged by:          Etienne Robillard
Email address:      erob@gthcfoundation.org
PostgreSQL version: 8.4.7
Operating system:   GNU/Linux 2.6.38 (Debian)
Description:        initdb: FATAL error: could not open relation with OID
2608
Details:

Could not run initdb --no-locale -D $PGDATA as pgsql
user to setup the internal postgresql db:

Script started on Mon 21 Mar 2011 07:44:29 AM EDT
$ /usr/local/pgsql/bin/initdb --no-locale -D $PGDATA
The files belonging to this database system will be owned by user "pgsql".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

fixing permissions on existing directory /var/db/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 28MB
creating configuration files ... ok
creating template1 database in /var/db/pgsql/data/base/1 ... ok
initializing pg_authid ... FATAL:  could not open relation with OID 2608
STATEMENT:  CREATE TRIGGER pg_sync_pg_database   AFTER INSERT OR UPDATE OR
DELET

child process exited with exit code 1
initdb: removing contents of data directory "/var/db/pgsql/data"
$ exit

Script done on Mon 21 Mar 2011 07:44:52 AM EDT

Re: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
Tom Lane
Дата:
"Etienne Robillard" <erob@gthcfoundation.org> writes:
> Could not run initdb --no-locale -D $PGDATA as pgsql
> user to setup the internal postgresql db:

> Script started on Mon 21 Mar 2011 07:44:29 AM EDT
> $ /usr/local/pgsql/bin/initdb --no-locale -D $PGDATA
> The files belonging to this database system will be owned by user "pgsql".
> This user must also own the server process.

> The database cluster will be initialized with locale C.
> The default database encoding has accordingly been set to SQL_ASCII.
> The default text search configuration will be set to "english".

> fixing permissions on existing directory /var/db/pgsql/data ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 100
> selecting default shared_buffers ... 28MB
> creating configuration files ... ok
> creating template1 database in /var/db/pgsql/data/base/1 ... ok
> initializing pg_authid ... FATAL:  could not open relation with OID 2608
> STATEMENT:  CREATE TRIGGER pg_sync_pg_database   AFTER INSERT OR UPDATE OR
> DELET

That's pretty darn odd.  Is this really an unmodified copy of 8.4.7?
What's different between your machine and all the other ones where
initdb works just fine?

            regards, tom lane

Re: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
Etienne Robillard
Дата:
On 21/03/11 11:00 AM, Tom Lane wrote:
> "Etienne Robillard" <erob@gthcfoundation.org> writes:
>
>> Could not run initdb --no-locale -D $PGDATA as pgsql
>> user to setup the internal postgresql db:
>>
>
>> Script started on Mon 21 Mar 2011 07:44:29 AM EDT
>> $ /usr/local/pgsql/bin/initdb --no-locale -D $PGDATA
>> The files belonging to this database system will be owned by user "pgsql".
>> This user must also own the server process.
>>
>
>> The database cluster will be initialized with locale C.
>> The default database encoding has accordingly been set to SQL_ASCII.
>> The default text search configuration will be set to "english".
>>
>
>> fixing permissions on existing directory /var/db/pgsql/data ... ok
>> creating subdirectories ... ok
>> selecting default max_connections ... 100
>> selecting default shared_buffers ... 28MB
>> creating configuration files ... ok
>> creating template1 database in /var/db/pgsql/data/base/1 ... ok
>> initializing pg_authid ... FATAL:  could not open relation with OID 2608
>> STATEMENT:  CREATE TRIGGER pg_sync_pg_database   AFTER INSERT OR UPDATE OR
>> DELET
>>
> That's pretty darn odd.  Is this really an unmodified copy of 8.4.7?
> What's different between your machine and all the other ones where
> initdb works just fine?
>
>             regards, tom lane
>

Hi,

$ md5sum postgresql-8.4.7.tar.gz
4771d4ae4fd9e7e9b92c22253517508d  postgresql-8.4.7.tar.gz

The detached MD5 signature matches the tarball I used for compiling
postgresql server so I don't think
its necessary to try downloading another. Maybe this is strictly a 8.4.x
issue but will need to verify
by downgrading to 8.3.x...

kind regards,

Etienne

--
Etienne Robillard

Company: Green Tea Hackers Club
Occupation: Software Developer (and CEO)
E-mail:     erob@gthcfoundation.org
Work phone: 450-936-2123
Website (Company):  https://gthc.org/
Website (Blog):     https://gthc.org/blog/
PGP public key fingerprint:    F2A9 32EA 8E7C 460F 1728  A1A7 649C 7F17 A086 DDEC

During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell

If a free society cannot help the many who are poor, it cannot save the few who are rich. -- John F. Kennedy

Re: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
Alvaro Herrera
Дата:
Excerpts from Etienne Robillard's message of lun mar 21 12:29:01 -0300 2011:

> $ md5sum postgresql-8.4.7.tar.gz
> 4771d4ae4fd9e7e9b92c22253517508d  postgresql-8.4.7.tar.gz
>
> The detached MD5 signature matches the tarball I used for compiling
> postgresql server so I don't think
> its necessary to try downloading another. Maybe this is strictly a 8.4.x
> issue but will need to verify
> by downgrading to 8.3.x...

8.4.x has been tested by hundreds of machines.  I build it here on a
Debian machine at least once a week and I have never seen this problem.
I don't think it's a generic PG problem; maybe there's something wrong
with your machine or setup.  Have you tested the hardware?  Is the
error reproducible exactly in the same way every time? (if not, it might
suggest a hardware problem -- did you try memtest86?).  If it's not a
hardware problem, how did you compile it?

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
Etienne Robillard
Дата:
On 22/03/11 10:51 AM, Alvaro Herrera wrote:
> Excerpts from Etienne Robillard's message of lun mar 21 12:29:01 -0300 2011:
>
>
>> $ md5sum postgresql-8.4.7.tar.gz
>> 4771d4ae4fd9e7e9b92c22253517508d  postgresql-8.4.7.tar.gz
>>
>> The detached MD5 signature matches the tarball I used for compiling
>> postgresql server so I don't think
>> its necessary to try downloading another. Maybe this is strictly a 8.4.x
>> issue but will need to verify
>> by downgrading to 8.3.x...
>>
> 8.4.x has been tested by hundreds of machines.  I build it here on a
> Debian machine at least once a week and I have never seen this problem.
> I don't think it's a generic PG problem; maybe there's something wrong
> with your machine or setup.  Have you tested the hardware?  Is the
> error reproducible exactly in the same way every time? (if not, it might
> suggest a hardware problem -- did you try memtest86?).  If it's not a
> hardware problem, how did you compile it?
>
>

yes the error is reproduced in both 8.4.7 and 8.4.6...

erob@localhost:~/work/postgresql-8.4.7$ head config.log

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by PostgreSQL configure 8.4.7, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ ./configure --prefix=/usr/local/pgsql --with-libxml --disable-debug
--enable-thread-safety --with-CC=llvm-gcc --with-openssl
--with-libs=/usr/lib --with-includes=/usr/include

I also just noticed the compiler was set to llvm-gcc and not gcc4. I
will try again
with gcc 4.4.5.

Regards,

--
Etienne Robillard

Company: Green Tea Hackers Club
Occupation: Software Developer (and CEO)
E-mail:     erob@gthcfoundation.org
Work phone: 450-936-2123
Website (Company):  https://gthc.org/
Website (Blog):     https://gthc.org/blog/
PGP public key fingerprint:    F2A9 32EA 8E7C 460F 1728  A1A7 649C 7F17 A086 DDEC

During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell

If a free society cannot help the many who are poor, it cannot save the few who are rich. -- John F. Kennedy

Re: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
Tom Lane
Дата:
Etienne Robillard <erob@gthcfoundation.org> writes:
> I also just noticed the compiler was set to llvm-gcc and not gcc4. I
> will try again with gcc 4.4.5.

I'd bet on that being the issue.  How recent is your copy of llvm?
We know that llvm produced bad code for PG up till not too long ago
(maybe a year, I'm not sure).

            regards, tom lane

Re: BUG #5937: initdb: FATAL error: could not open relation with OID 2608

От
Etienne Robillard
Дата:
On 22/03/11 06:26 PM, Tom Lane wrote:
>
> I'd bet on that being the issue.  How recent is your copy of llvm?
> We know that llvm produced bad code for PG up till not too long ago
> (maybe a year, I'm not sure).
>
>             regards, tom lane
>
$ llvm-gcc --version
llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Definitely the error was the --with-CC=llvm-gcc option. I wonder if
clang would produces
the same results..

Regards,

--
Etienne Robillard

Company: Green Tea Hackers Club
Occupation: Software Developer (and CEO)
E-mail:     erob@gthcfoundation.org
Work phone: 450-936-2123
Website (Company):  https://gthc.org/
Website (Blog):     https://gthc.org/blog/
PGP public key fingerprint:    F2A9 32EA 8E7C 460F 1728  A1A7 649C 7F17 A086 DDEC

During times of universal deceit, telling the truth becomes a revolutionary act. -- George Orwell

If a free society cannot help the many who are poor, it cannot save the few who are rich. -- John F. Kennedy