FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-26-2009, 03:30 AM
will trillich
 
Default apt-get upgrade... and now postgres 7.4 won't start!

on debian 4.0, apt-get update && apt-get upgrade led to a problem
where postgres 7 won't start! apparently utility program
"pg_controldata" is supposed to generate some locale-info that's
parsed by perl script "pg_ctlcluster", and the two suddenly don't jibe
at all--

argh:

"""
Setting up postgresql-7.4 (7.4.23-0etch1) ...
Starting PostgreSQL 7.4 database server: mainpg_controldata: could not
open file "/var/lib/postgresql/7.4/main/global/pg_control" for
reading: No such file or directory
Error: Could not parse locale out of pg_controldata output
failed!
invoke-rc.d: initscript postgresql-7.4, action "start" failed.
dpkg: error processing postgresql-7.4 (--configure):
subprocess post-installation script returned error exit status 1
"""

trying /etc/init.d/postgresql-7.4 start -- we traced the process where
the trouble occurs to perl script "pg_ctlcluster":

# perl -Td `which pg_ctlcluster ` 7.4 main start

after some stepping and nexting, we get to here:

pg_controldata: could not open file
"/var/lib/postgresql/7.4/main/global/pg_control" for reading: No such
file or directory
PgCommon::get_cluster_locales(/usr/share/postgresql-common/PgCommon.pm:707):
707: restore_exec;

DB<2> v
704: prepare_exec ('LC_ALL', 'LANG', 'LANGUAGE');
705: $ENV{'LC_ALL'} = 'C';
706: my $result = open (CTRL, '-|', $pg_controldata,
(cluster_data_directory $version, $cluster));
707==> restore_exec;
708: return (undef, undef) unless defined $result;
709: while (<CTRL>) {
710: if (/^LC_CTYPEW*(S+)s*$/) {
711: $lc_ctype = $1;
712 } elsif (/^LC_COLLATEW*(S+)s*$/) {
713: $lc_collate = $1;

the problem is in line 706 -- open(filehandle, mode, file) -- the mode
is "-|" meaning that "file" is really a command that generates output
that's piping to our perl process... but $pg_controldata isn't playing
nice:

/usr/lib/postgresql/7.4/bin/pg_controldata /var/lib/postgresql/7.4/main
pg_controldata: could not open file
"/var/lib/postgresql/7.4/main/global/pg_control" for reading: No such
file or directory

therein lies the rub. suggestions are welcome!

===

also, if i 'cheat' and manually inject $lc_type = 'C' around line 709,
then the result is only slightly different:

"""
The PostgreSQL server failed to start. Please check the log output:
/usr/lib/postgresql/7.4/bin/postmaster: could not find the database system
Expected to find it in the directory "/var/lib/postgresql/7.4/main",
but could not open file
"/var/lib/postgresql/7.4/main/global/pg_control": No such file or
directory
"""

there *is* a pg_control.gz file there, which contains "[<digit>] <digits>"...?

ideas?

--
will trillich -- http://faq.serensoft.com/
Less is only more where more is no good. -- Frank Lloyd Wright


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-26-2009, 10:39 AM
"Eugene V. Lyubimkin"
 
Default apt-get upgrade... and now postgres 7.4 won't start!

will trillich wrote:
> on debian 4.0, apt-get update && apt-get upgrade led to a problem
> where postgres 7 won't start! apparently utility program
> "pg_controldata" is supposed to generate some locale-info that's
> parsed by perl script "pg_ctlcluster", and the two suddenly don't jibe
> at all--
[snip]
> The PostgreSQL server failed to start. Please check the log output:
> /usr/lib/postgresql/7.4/bin/postmaster: could not find the database system
> Expected to find it in the directory "/var/lib/postgresql/7.4/main",
> but could not open file
> "/var/lib/postgresql/7.4/main/global/pg_control": No such file or
> directory
> """
>
> there *is* a pg_control.gz file there, which contains "[<digit>] <digits>"...?
>
> ideas?
File a bug, and wait for maintainers' comments.

--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
Ukrainian C++ Developer, Debian Maintainer, APT contributor
 

Thread Tools




All times are GMT. The time now is 07:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org