pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedServer 9.1 doesn't restart and no output/log - data files seem corrupted
3+ messages / 2 participants
[nested] [flat]
* Server 9.1 doesn't restart and no output/log - data files seem corrupted
@ 2013-04-04 19:25 Pascal Polleunus <ppo_postgresql@especific.be>
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Polleunus @ 2013-04-04 19:25 UTC (permalink / raw)
To: pgsql-admin
Hi,
The server was running correctly.
I didn't changed the configuration.
I did an apt-get upgrade and it didn't restarted.
The problem is maybe not related to the upgrade but appeared during the
restart.
I did the same upgrade on another (very similar) server and didn't have
any problem.
The configuration files and files permissions are the same.
The PostgreSQL packages that were upgraded:
postgresql-9.1:amd64 (9.1.8-1, 9.1.9-0wheezy1)
postgresql-client-9.1:amd64 (9.1.8-1, 9.1.9-0wheezy1)
libpq-dev:amd64 (9.1.8-1, 9.1.9-0wheezy1)
libpq5:amd64 (9.1.8-1, 9.1.9-0wheezy1)
The commands I tried to start the server:
# service postgresql start
[FAIL] Starting PostgreSQL 9.1 database server: main[....] The
PostgreSQL server failed to start. Please check the log output. ... failed!
failed!
# pg_ctlcluster 9.1 main start
The PostgreSQL server failed to start. Please check the log output.
There's nothing in the log files.
I checked their permissions.
I renamed the files but they were not created again.
I created a new cluster and it started.
So I guess there's some corruption in the data files.
I replaced the data files with an old copy from 12 hours before but the
server won't start.
I tried to use pg_resetxlog:
# su postgres -c '/usr/lib/postgresql/9.1/bin/pg_resetxlog
/var/lib/postgresql/9.1/main'
The database server was not shut down cleanly.
Resetting the transaction log might cause data to be lost.
If you want to proceed anyway, use -f to force reset.
Then:
# su postgres -c '/usr/lib/postgresql/9.1/bin/pg_resetxlog -f
/var/lib/postgresql/9.1/main'
Transaction log reset
But it still won't start.
What can I do?
Thanks in advance.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Server 9.1 doesn't restart and no output/log - data files seem corrupted
@ 2013-04-04 20:18 Pascal Polleunus <ppo_postgresql@especific.be>
parent: Pascal Polleunus <ppo_postgresql@especific.be>
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Polleunus @ 2013-04-04 20:18 UTC (permalink / raw)
To: pgsql-admin
I managed to solve the problem.
For the record, I did the following:
mkdir -p ~/postgresql/{etc,lib,log}
cp -a /etc/postgresql/9.1/main ~/postgresql/etc/old-install
cp -a /var/lib/postgresql/9.1/main ~/postgresql/lib/old-install
cp -a /var/log/postgresql ~/postgresql/log/old-install
apt-get remove --purge postgresql-9.1 postgresql-client-9.1
postgresql-client-common postgresql-common
rm -rf /etc/postgresql
rm -rf /var/lib/postgresql
apt-get install postgresql
service postgresql stop
cp -a /etc/postgresql/9.1/main ~/postgresql/etc/new-install
cp -a /var/lib/postgresql/9.1/main ~/postgresql/lib/new-install
rm -rf /var/lib/postgresql/9.1/main
cp -a ~/postgresql/lib/old-install /var/lib/postgresql/9.1/main
su postgres -c '/usr/lib/postgresql/9.1/bin/pg_resetxlog -f
/var/lib/postgresql/9.1/main'
I edited /etc/postgresql/9.1/main/postgresql.conf
service postgresql start
And it worked :-)
On 04/04/13 21:25, Pascal Polleunus wrote:
> Hi,
>
> The server was running correctly.
> I didn't changed the configuration.
> I did an apt-get upgrade and it didn't restarted.
> The problem is maybe not related to the upgrade but appeared during the
> restart.
>
> I did the same upgrade on another (very similar) server and didn't have
> any problem.
> The configuration files and files permissions are the same.
>
>
> The PostgreSQL packages that were upgraded:
> postgresql-9.1:amd64 (9.1.8-1, 9.1.9-0wheezy1)
> postgresql-client-9.1:amd64 (9.1.8-1, 9.1.9-0wheezy1)
> libpq-dev:amd64 (9.1.8-1, 9.1.9-0wheezy1)
> libpq5:amd64 (9.1.8-1, 9.1.9-0wheezy1)
>
>
> The commands I tried to start the server:
> # service postgresql start
> [FAIL] Starting PostgreSQL 9.1 database server: main[....] The
> PostgreSQL server failed to start. Please check the log output. ... failed!
> failed!
>
> # pg_ctlcluster 9.1 main start
> The PostgreSQL server failed to start. Please check the log output.
>
>
> There's nothing in the log files.
> I checked their permissions.
> I renamed the files but they were not created again.
>
>
> I created a new cluster and it started.
> So I guess there's some corruption in the data files.
>
>
> I replaced the data files with an old copy from 12 hours before but the
> server won't start.
>
>
> I tried to use pg_resetxlog:
> # su postgres -c '/usr/lib/postgresql/9.1/bin/pg_resetxlog
> /var/lib/postgresql/9.1/main'
> The database server was not shut down cleanly.
> Resetting the transaction log might cause data to be lost.
> If you want to proceed anyway, use -f to force reset.
>
> Then:
> # su postgres -c '/usr/lib/postgresql/9.1/bin/pg_resetxlog -f
> /var/lib/postgresql/9.1/main'
> Transaction log reset
>
> But it still won't start.
>
>
> What can I do?
>
> Thanks in advance.
>
>
>
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Server 9.1 doesn't restart and no output/log - data files seem corrupted
@ 2014-07-15 09:03 mitalpritmani <mitalpritmani@gmail.com>
parent: Pascal Polleunus <ppo_postgresql@especific.be>
0 siblings, 0 replies; 3+ messages in thread
From: mitalpritmani @ 2014-07-15 09:03 UTC (permalink / raw)
To: pgsql-admin
Thanks for your post. That helped me for solving my issue.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Server-9-1-doesn-t-restart-and-no-output-log-data-files-seem...
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2014-07-15 09:03 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04 19:25 Server 9.1 doesn't restart and no output/log - data files seem corrupted Pascal Polleunus <ppo_postgresql@especific.be>
2013-04-04 20:18 ` Pascal Polleunus <ppo_postgresql@especific.be>
2014-07-15 09:03 ` mitalpritmani <mitalpritmani@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox