Sponsored Content
Full Discussion: Postgresql Database Corrupt
Special Forums UNIX and Linux Applications High Performance Computing Postgresql Database Corrupt Post 302769379 by ahsanpmd on Tuesday 12th of February 2013 04:58:52 AM
Old 02-12-2013
Postgresql Database Corrupt

I am managing a linux cluster which has been build on Platform Cluster Manager PCM 1.2.1) from IBM Platform Computing. Unfortunately somebody deteled data files of postgresql from /var/lib directory. I somehow managed to start the postmaster service again, but all the administrative commands of cluster are not not working. like addhost

Code:
[root@pmd ~]# addhost
KusuDB: Operational Error occurred when connecting to the DB
       Most likely cause: insufficient permissions for user=nobody
FATAL:  database "kusudb" does not exist

ERROR:  Database query failed!  Make sure the database is available

[root@pmd ~]#

I dont want to rebuild cluster as it will lead to the loss of much effort which I did on installing certain applications and running them on the cluster.
Please help me !

Last edited by Scott; 02-12-2013 at 06:21 AM.. Reason: Code tags
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

Security Databases are corrupt. HELP!!

Help! SCO Unix 5.05. A relatievely new system went down on me today. I got the dreaded error: Out of Space on Device (1/42). I was able to clear up some space in the /tmp directory, however, when I try to boot, the system prompts me to go into single user mode and I get the... (2 Replies)
Discussion started by: gseyforth
2 Replies

2. UNIX for Dummies Questions & Answers

I got a corrupt /etc/inittab file....what next?

Hi guys, For some reason a client has given us a Sun Netra T1 with Solaris 8 to administer for them. That's always good business. However, the other day we rebooted the machine and to our amazement, after doing the preliminary hardware tests, we got an error messgae saying that /etc/inittab was... (3 Replies)
Discussion started by: Ivo
3 Replies

3. UNIX for Dummies Questions & Answers

Causing a disk to be corrupt

Hmm, how to ask this without sounding too malicious... How might one go about causing a disk corruption in OS X specifically or via the command line in UNIX in general? Doesnt matter the severity of the problem, I just want to scare the person a little, then fix the problem for them. Any... (1 Reply)
Discussion started by: Yummator
1 Replies

4. HP-UX

Corrupt Member File

I have been fine adding/removing printers up until this week. Now when I go to add a new remote printer I get "corrupted member file". I go to /etc/lp/member and the byte count on the new printer name is 0. I VI the file and put /dev/null in to make it the correct size and it all looks fine and... (2 Replies)
Discussion started by: astout
2 Replies

5. Shell Programming and Scripting

Script to connect to PostgreSQL database

Hi All, Has anyone of you connected to a remote PostgreSQL database through a shell/perl script. Can you please let me know the steps involed? Thanks. Rahul. (0 Replies)
Discussion started by: rahulrathod
0 Replies

6. Solaris

How to corrupt a superblock?

I need to corrupt a superblock of a mounted device in a soalris m/c and check recovery from an alternate superblock. How can this be done? (2 Replies)
Discussion started by: sujathan
2 Replies

7. HP-UX

corrupt disk

Hallo Friends, I have application X running on hpux 11.11 and oracle 9i release 2. I recently had a hardware failure on disk /dev/dsk/c2t0d0 Below is the systemlog file : root@a7dmc:/var/adm/syslog > /opt/resmon/bin/resdata -R 155713541 -r /storage/events/enclosures/gazemon/0_1_1_0.0.0... (11 Replies)
Discussion started by: kekanap
11 Replies

8. Shell Programming and Scripting

Script causing database corrupt

Hi, Closing the thread (3 Replies)
Discussion started by: dbashyam
3 Replies

9. Shell Programming and Scripting

Setting up postgreSql database

Hi I have a small bash script which I want to run on an Amazon EC2 Ubuntu instance for setting up a postgreSQL database: #!/bin/bash USERNAME='postgres' start=$SECONDS TMP_DIR=/local/test/4g4d PORT=23456 rm -rf $TMP_DIR/db mkdir -p $TMP_DIR/ echo "creating database..."... (3 Replies)
Discussion started by: Helveticus
3 Replies
PG_UPGRADECLUSTER(8)					 Debian PostgreSQL infrastructure				      PG_UPGRADECLUSTER(8)

NAME
pg_upgradecluster - upgrade an existing PostgreSQL cluster to a new major version. SYNOPSIS
pg_upgradecluster [-v newversion] version name [newdatadir] DESCRIPTION
pg_upgradecluster upgrades an existing PostgreSQL server cluster (i. e. a collection of databases served by a postmaster instance) to a new version specified by newversion (default: latest available version). The configuration files of the old version are copied to the new cluster. The cluster of the old version will be configured to use a previously unused port since the upgraded one will use the original port. The old cluster is not automatically removed. After upgrading, please verify that the new cluster indeed works as expected; if so, you should remove the old cluster with pg_dropcluster(8). Please note that the old cluster is set to "manual" startup mode, in order to avoid inadvertently changing it; this means that it will not be started automatically on system boot, and you have to use pg_ctlcluster(8) to start/stop it. See section "STARTUP CONTROL" in pg_createcluster(8) for details. The newdatadir argument can be used to specify a non-default data directory of the upgraded cluster. It is passed to pg_createcluster. If not specified, this defaults to /var/lib/postgresql/version/name. Please note that this program cannot upgrade clusters which use tablespaces. If you use those, you have to upgrade manually. OPTIONS
-v newversion Set the version to upgrade to (default: latest available). --logfile filel Set a custom log file path for the upgraded database cluster. --locale=locale Set the default locale for the upgraded database cluster. If this option is not specified, the locale is inherited from the old cluster. --lc-collate=locale --lc-ctype=locale --lc-messages=locale --lc-monetary=locale --lc-numeric=locale --lc-time=locale Like --locale, but only sets the locale in the specified category. HOOK SCRIPTS
Some PostgreSQL extensions like PostGIS need metadata in auxiliary tables which must not be upgraded from the old version, but rather initialized for the new version before copying the table data. For this purpose, extensions (as well as administrators, of course) can drop upgrade hook scripts into /etc/postgresql-common/pg_upgradecluster.d/. Script file names must consist entirely of upper and lower case letters, digits, underscores, and hyphens; in particular, dots (i. e. file extensions) are not allowed. Scripts in that directory will be called with the following arguments: <old version> <cluster name> <new version> <phase> Phases: init A virgin cluster of version new version has been created, i. e. this new cluster will already have template1, but no user databases. Please note that you should not create tables in this phase, since they will be overwritten by the dump/restore operation. finish All data from the old version cluster has been dumped/reloaded into the new one. The old cluster still exists. The scripts are called as the user who owns the database. SEE ALSO
pg_createcluster(8), pg_dropcluster(8), pg_lsclusters(1), pg_wrapper(1) AUTHOR
Martin Pitt <mpitt@debian.org> Debian 2012-10-08 PG_UPGRADECLUSTER(8)
All times are GMT -4. The time now is 12:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy