2010/11/2 Grzegorz Jaśkiewicz <gryz...@gmail.com>

> try gdb --args ./pg_upgrade -d /var/pgsql-8_4_3/data/ -D
> /var/pgsql-9_0_1/data/ -b /var/pgsql-8_4_3/bin/ -B
> /var/pgsql-9_0_1/bin/ --check -P 5433 -v -g -G debug
> and when it fails, type in 'bt' and paste it here please.
>
> --
> GJ
>

Well, this is strange. I run the same command line with gbd, it does not
throw the segfault.
The first time it gave me some error, but with sensible info:

===============
Starting program: /var/pgsql-9_0_1/bin/pg_upgrade -d /var/pgsql-8_4_3/data/
-D /var/pgsql-9_0_1/data/ -b /var/pgsql-8_4_3/bin/ -B /var/pgsql-9_0_1/bin/
--check -P 5433 -v -g -G debug
[Thread debugging using libthread_db enabled]
Running in verbose mode
Running in debug mode
Detaching after fork from child process 30334.
Detaching after fork from child process 30335.
PerForming Consistency Checks on Old Live Server
------------------------------------------------
Checking old data directory (/var/pgsql-8_4_3/data)         ok
Checking old bin directory (/var/pgsql-8_4_3/bin)           ok
Checking new data directory (/var/pgsql-9_0_1/data)         ok
Checking new bin directory (/var/pgsql-9_0_1/bin)           ok
Detaching after fork from child process 30336.
Detaching after fork from child process 30337.
Checking for reg* system oid user data types                ok
Checking for /contrib/isn with bigint-passing mismatch      ok
Checking for large objects                                  ok
"/var/pgsql-9_0_1/bin/pg_ctl" -l "/dev/null" -D "/var/pgsql-9_0_1/data" -o
"-p 5433 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000" start >>
"/dev/null" 2>&1
Detaching after fork from child process 30362.
Trying to start new server
 .................ok

 Unable to start new postmaster with the command:
"/var/pgsql-9_0_1/bin/pg_ctl" -l "/dev/null" -D "/var/pgsql-9_0_1/data" -o
"-p 5433 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000" start >>
"/dev/null" 2>&1
Perhaps pg_hba.conf was not set to "trust".
Program exited with code 01.
Missing separate debuginfos, use: debuginfo-install glibc-2.11.1-4.i686
========================================================

I found (by calling pg_ctl manually and redirecting the log somewhere) that
there was a postmaster.opts not writable by postgres.
I fixed that, run again, and all seemed well, but...

===============================================================
Reading symbols from /var/pgsql-9_0_1/bin/pg_upgrade...(no debugging symbols
found)...done.
(gdb) run
Starting program: /var/pgsql-9_0_1/bin/pg_upgrade -d /var/pgsql-8_4_3/data/
-D /var/pgsql-9_0_1/data/ -b /var/pgsql-8_4_3/bin/ -B /var/pgsql-9_0_1/bin/
--check -P 5433 -v -g -G debug
[Thread debugging using libthread_db enabled]
Running in verbose mode
Running in debug mode
Detaching after fork from child process 30680.
Detaching after fork from child process 30681.
PerForming Consistency Checks on Old Live Server
------------------------------------------------
Checking old data directory (/var/pgsql-8_4_3/data)         ok
Checking old bin directory (/var/pgsql-8_4_3/bin)           ok
Checking new data directory (/var/pgsql-9_0_1/data)         ok
Checking new bin directory (/var/pgsql-9_0_1/bin)           ok
Detaching after fork from child process 30682.
Detaching after fork from child process 30683.
Checking for reg* system oid user data types                ok
Checking for /contrib/isn with bigint-passing mismatch      ok
Checking for large objects                                  ok
"/var/pgsql-9_0_1/bin/pg_ctl" -l "/dev/null" -D "/var/pgsql-9_0_1/data" -o
"-p 5433 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000" start >>
"/dev/null" 2>&1
Detaching after fork from child process 30708.
Checking for presence of required libraries                 ok

*Clusters are compatible*
"/var/pgsql-9_0_1/bin/pg_ctl" -l "/dev/null" -D "/var/pgsql-9_0_1/data"
 stop >> "/dev/null" 2>&1
Detaching after fork from child process 30724.

Program exited normally.
Missing separate debuginfos, use: debuginfo-install glibc-2.11.1-4.i686
==================================================

But when I run the pg_upgrade outside gbd, again the segfault:

===================

./pg_upgrade -d /var/pgsql-8_4_3/data/ -D /var/pgsql-9_0_1/data/ -b
/var/pgsql-8_4_3/bin/ -B /var/pgsql-9_0_1/bin/ --check -P 5433 -v -g -G
debug
Running in verbose mode
Running in debug mode
PerForming Consistency Checks on Old Live Server
------------------------------------------------
Checking old data directory (/var/pgsql-8_4_3/data)         ok
Checking old bin directory (/var/pgsql-8_4_3/bin)           ok
Checking new data directory (/var/pgsql-9_0_1/data)         ok
Checking new bin directory (/var/pgsql-9_0_1/bin)           ok
Segmentation fault

==============================================

WTF?

Hernán J. González

Reply via email to