473,899 Members | 2,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PostgreSQL upgrade -> fails to start server

Hi,

After a very recent postgresql update, the postmaster failed to start
because of this:

| PANIC: The database cluster was initialized with LC_CTYPE
| 'n****@euro.UTF-8', which is not recognized by setlocale().
| It looks like you need to initdb.

Now I know nl***@euro.UTF-8 is an incorrect locale, I fixed that some
time ago, but because postgresql kept on running, and the machine didn't
reboot in the mean time, I noticed nothing when the new libc's / locales
stopped 'supporting' that (faulty) locale.

To make a long story short: i can't activate that locale again,
therefore the postmaster won't start, and therefore I can't salvage my
databases to re-create them & finish the postgresql upgrade.

Now I found out the binary file data/global/pg_control matches the
faulty locale, so I tried to vi that in a desperate attempt to start the
server, but it failed and I had to restore the original.

Is there some way that I can get to my precious databases?
I fear that downgrading postgresql won't work, because the locale still
isn't available, so it probably won't start either.

Help? :)

I'm running Debian Unstable, libc6/locales 2.3.2, postgresql 7.3.4.

Thanks!
Sander.
--
| A conscience is what hurts when all of your other parts feel so good.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 11 '05
12 6200
Quoting Miquel van Smoorenburg (mi*****@cistro n.nl):
| PANIC: The database cluster was initialized with LC_CTYPE
| 'n****@euro.UTF-8', which is not recognized by setlocale().
| It looks like you need to initdb.
Is there some way that I can get to my precious databases?


You have the source. Find where it prints this, make it not panic
but continue, recompile, run that server, run psql, drop the indexes,
dump the database.


Hey mike ;)
I know I /have/ the source. But I find it rather strange that I have to
/hack/ the source to have it start.

I'm thankful for the postgresql people to protect me from damaging my
databases while i'm /not aware/ of the problem, but in this situation it
almost feels windows-like (no offence :P) since there is NO way to have
it start now, even if i really really really really really want it to.

I hope pgsql-devel people are reading, and willing to implement a system
like apt has when you want to remove something important like libc6:

| Please type the following line, without the quotation marks, to state
| that you really want this, and that you know what you're doing:
| "I know what i'm doing. Please let me damage my databases. I won't
| complain on mailinglists, and I have recent backups."
|
| Repeat>

btw, postgresql in Debian is built with doogies build system *shiver*

Sander.
--
| Chinese proverb: Do not meet girl in park, instead park meet in girl!
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/UYm61GN+QQjOyU0 RAhQnAJsGQuPmld HRiSjxHLqvtBQp4 CLvcACeKFGf
xwizzrinIcB0Rpy cbezCL94=
=StGb
-----END PGP SIGNATURE-----

Nov 11 '05 #11
Quoting Martijn van Oosterhout (kl*****@svana. org):
Postgres already has a -P option to disable system indexes. Would it be
feasable to have a safe mode so that if your locale is broken it sets that
flag and also sets enable_indexsca n to false. This would at least give you
enough to pg_dump things.


Also see my post to Miquel on this list. I'd really like to see such an
option. Even though i'll try hard not to have this problem ever again.

So. I'll be hacking postgresql sources today ;)

Sander.
--
| You are not getting older, you're just getting closer to death.
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/UYqs1GN+QQjOyU0 RAkEwAJ9Ae+vFsr 47bTGI8aSzv5K8l 4IiBQCfYphi
aGJ6MHxu+gjXrhn wuSApb0c=
=lX+q
-----END PGP SIGNATURE-----

Nov 11 '05 #12
Quoting Sander Smeenk (ss*******@fres hdot.net):
Postgres already has a -P option to disable system indexes. Would it be
feasable to have a safe mode so that if your locale is broken it sets that
flag and also sets enable_indexsca n to false. This would at least give you
enough to pg_dump things.

Also see my post to Miquel on this list. I'd really like to see such an
option. Even though i'll try hard not to have this problem ever again.
So. I'll be hacking postgresql sources today ;)


Well, not really that day, but today I hacked postgresql :)

Line 2261 in src/backend/access/transam/xlog.c changed from

- if (setlocale(LC_C TYPE, ControlFile->lc_collate) == NULL)

to

+ if (setlocale(LC_C TYPE, "nl_NL.UTF-8") == NULL)

rebuilt the debian package, made backups, installed it and:

-rw-r--r-- 1 postgres postgres 8461201 Sep 3 22:38 db.all.sql

The dump looks all normal! Guess I was lucky that the 'wrong' locale the
db was initialised with was also 100% nl_NL.UTF-8 aparently :)

I'll go re-create the database then, and try to import the dump.

Thanks everyone for all the ideas!
Sander.
--
| I must consider my sins...
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8 9BDB D463 7E41 08CE C94D

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/VlYy1GN+QQjOyU0 RAnw4AKCBSzveRR wpImoxdXXkqP5xy IigFACdECGP
4DHfs1TKjN+0Yr0 CFcC0LMU=
=QzgC
-----END PGP SIGNATURE-----

Nov 11 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8333
by: Bill Kratzer | last post by:
Hi... I am currently working on a Java-based product that is backed by PostgreSQL (among other databases). I have noticed that PostgreSQL appears to truncate column alias names after 31 characters. I have replicated this through JDBC (in Java), PEAR (in PHP), and on the command-line interface (psql). For example (this is from the psql command-line tool):
125
14950
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from software giant such as Microsoft SQL Server, Oracle, and Sybase? Is PostgreSQL reliable enough to be used for high-end commercial application? Thanks
7
2255
by: Peter Eisentraut | last post by:
Greetings. The official PostgreSQL documentation has been translated to German and has been published as a book by verlag moderne industrie/mitp ("PostgreSQL: Das offizielle Handbuch", ISBN 3-8266-1337-6, see <http://www.mitp.de/vmi/mitp/detail/pWert/1337>). I am the translator of this work, but let me assure you I don't get any additional money depending on how much it sells. On the other hand, the publisher has assured me that a...
2
1811
by: Mike Mascari | last post by:
Apparently the Postgres lineage is sufficiently obfuscated to cause people to think that the correct pronunciation/shorthand of PostgreSQL is 'Postgre' and not 'Postgres'. Note the last line in the "What's New in this Version" paragraph: http://www.apple.com/downloads/macosx/unix_open_source/postgresql.html Perhaps all introductory material, press releases, etc. should begin like: PostgreSQL, descendant of Postgres, is a sophisticated
15
2436
by: Manuel Tejada | last post by:
Hello list This is my situation: My box: Pentium III, Red Hat 9.0 I was working fine with PostgreSQL 7.3.2. Recently I decided to upgrade it to PostgreSQL 7.4 installing the twelve rpms I downloaded from ftp://ftp15.us.postgresql.org/binar...dhat/refhat-9/.
14
4134
by: Manuel Tejada | last post by:
Hi My box: RedHat 9.0, Pentium III Recently I upgraded from PostgreSQL 7.3.2 to PostgreSQL 7.4.1. The PostgreSQL 7.3.2's rpms were installed from RehHat CDs The PostgreSQL 7.4.1's rpms I used to upgrade were downloaded from RHEL3 subdirectory (of the mirror ftp://ftp4.ar.postgresql.org/pub/mirrors/postgresql/binary/v7.4.1/redhat/rhel3). The upgrade is working well, even I can connect to PostgreSQL from a PHP
2
1553
by: Adam Williams | last post by:
Hi, as my title states I'm trying to upgrade from 7.2 to 7.3 on redhat linux 9. I've been following the documentation instructions on the website but ran into problems. I searched on google but could not find my answer. On postgresql as user postgres I ran the command pg_dumpall > sroom1 and then after installing 7.3 I ran psql template1 < sroom1 but when I run that after a bunch of grants, revokes, etc, it prints the error: ...
1
2609
by: Frans | last post by:
Hello All, I have just upgrade my postgresql to 7.4.5-2, but I have problem with default value in postgresql 7.4.5-2, everytime I set default value for varchar or timestamp fields, the result value always change to sometihing like this : I set the default value to '1900-01-01 00:00:00' , but the result is '1900-01-01 00:00:00'::timestamp without time zone I've tried to erase the "::timestamp withut time zone" but it didn't work.
1
2427
by: rich | last post by:
I want to upgrade php 4.3.9 and postgresql 7.4.13 on Centos 4.3 to php 5.1.4 and postgresql 8.1.4 using rpms. Has anyone done this?
0
4282
by: nilart | last post by:
Hi , Our current windows application uses postgre 8.1 while next release will be using postgre 8.3 Naturally when application is upgraded ..postgre is expected to upgrade To support this upgrade we will be taking following path: 1) run pgdump & take backup of existing database
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11276
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8043
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4721
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3320
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.