Database Server in Recovery mode!

Поиск
Список
Период
Сортировка
Искать

Database Server in Recovery mode!

От:
Rajesh Kumar Mallah <mallah@trade-india.com>
Дата:
 Hi Friends 

please help.

my database server has gone in recovery mode for some
reasons i donot know.

what is the possible steps one shud take to bring the database
up to an usable state in minimum time.
 

Below is the message when i try to connect.

the the out put of ps in the database server.
 

regds
mallah.
 
 

[rmallah@system11 rmallah]$ psql -h 130.94.22.209 -Utradein  tradein_clients
psql: The Data Base System is in recovery mode
[rmallah@system11 rmallah]$
 
 
 

[root@linux10320 data]# ps auxwww | grep post
postgres  1839  0.0  0.0 138992 856 ?        S    Apr12   2:43 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  3901  6.0  1.4 141068 15248 ?      D    12:05   1:29 postgres: tradein tradein_clients 130.94.20.27 COPY
root      5862  0.0  0.0  1360  512 pts/3    S    12:29   0:00 grep post
[root@linux10320 data]#
 

followups : Database Server in Recovery mode!

От:
Rajesh Kumar Mallah <mallah@trade-india.com>
Дата:
Hi i tried to stop it later
and following is what is happening

regds
mallah.
 

bash-2.03$ pg_ctl -D /var/lib/pgsql/data stop
waiting for postmaster to shut down...................................................
............. failed
pg_ctl: postmaster does not shut down
bash-2.03$

then i did:

bash-2.03$ pg_ctl -D /var/lib/pgsql/data stop  -m immediate
waiting for postmaster to shut down....done
postmaster successfully shut down
bash-2.03$ pg_ctl -D /var/lib/pgsql/data start
postmaster successfully started
bash-2.03$ DEBUG:  database system was interrupted at 2002-04-25 12:10:43 IST
DEBUG:  CheckPoint record at (91, 2768917524)
DEBUG:  Redo record at (91, 2768306852); Undo record at (91, 2718752328); Shutdown FALSE
DEBUG:  NextTransactionId: 10070150; NextOid: 86521966
DEBUG:  database system was not properly shut down; automatic recovery in progress...
DEBUG:  redo starts at (91, 2768306852)
DEBUG:  open(logfile 91 seg 166) failed: No such file or directory
DEBUG:  redo done at (91, 2785015440)
The Data Base System is starting up

bash-2.03$
 

on connesting from a cleint:

[rmallah@system11 rmallah]$ psql -h 130.94.22.209 -Utradein  tradein_clients
psql: The Data Base System is starting up
[rmallah@system11 rmallah]$
 
 

Rajesh Kumar Mallah wrote:

Hi Friends

please help.

my database server has gone in recovery mode for some
reasons i donot know.

what is the possible steps one shud take to bring the database
up to an usable state in minimum time.
 

Below is the message when i try to connect.

the the out put of ps in the database server.
 

regds
mallah.
 
 

[rmallah@system11 rmallah]$ psql -h 130.94.22.209 -Utradein  tradein_clients
psql: The Data Base System is in recovery mode
[rmallah@system11 rmallah]$
 
 
 

[root@linux10320 data]# ps auxwww | grep post
postgres  1839  0.0  0.0 138992 856 ?        S    Apr12   2:43 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  3901  6.0  1.4 141068 15248 ?      D    12:05   1:29 postgres: tradein tradein_clients 130.94.20.27 COPY
root      5862  0.0  0.0  1360  512 pts/3    S    12:29   0:00 grep post
[root@linux10320 data]#
 

Re: Database Server in Recovery mode!

От:
Rajesh Kumar Mallah <mallah@trade-india.com>
Дата:
   
oops forgot to post the ps auxwww | grep "post"

bash-2.03$ ps auxwww| grep post
postgres  3901  3.4  1.3 141068 13868 ?      D    12:05   1:29 postgres: tradein tradein_clients 130.94.20.27 COPY
root      6476  0.0  0.0  2156  888 pts/3    S    12:39   0:00 su - postgres
postgres  6478  0.0  0.1  2004 1168 pts/3    S    12:39   0:00 -bash
postgres  7058  0.0  0.3 139200 3780 pts/3   S    12:44   0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  7059  0.3  1.9 140808 19688 pts/3  D    12:44   0:00 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  7396  0.0  0.0  2324  696 pts/3    R    12:47   0:00 ps auxwww
postgres  7397  0.0  0.0  1360  512 pts/3    S    12:47   0:00 grep post
bash-2.03$

hmmm.  two postmasters ??

and perhaps the   "postgres: tradein tradein_clients 130.94.20.27 COPY"  is the guilty one

how do i get rid of that ...

anyway heading for a reboot becoz this is a live server !
(am i risking  data loss?? here )

regds
mallah.
 
 

Rajesh Kumar Mallah wrote:

Hi Friends

please help.

my database server has gone in recovery mode for some
reasons i donot know.

what is the possible steps one shud take to bring the database
up to an usable state in minimum time.
 

Below is the message when i try to connect.

the the out put of ps in the database server.
 

regds
mallah.
 
 

[rmallah@system11 rmallah]$ psql -h 130.94.22.209 -Utradein  tradein_clients
psql: The Data Base System is in recovery mode
[rmallah@system11 rmallah]$
 
 
 

[root@linux10320 data]# ps auxwww | grep post
postgres  1839  0.0  0.0 138992 856 ?        S    Apr12   2:43 /usr/bin/postmaster -D /var/lib/pgsql/data
postgres  3901  6.0  1.4 141068 15248 ?      D    12:05   1:29 postgres: tradein tradein_clients 130.94.20.27 COPY
root      5862  0.0  0.0  1360  512 pts/3    S    12:29   0:00 grep post
[root@linux10320 data]#
 

Re: Database Server in Recovery mode!

От:
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Дата:

On Thu, 25 Apr 2002, Rajesh Kumar Mallah wrote:

> oops forgot to post the ps auxwww | grep "post"
>
> bash-2.03$ ps auxwww| grep post
> postgres  3901  3.4  1.3 141068 13868 ?      D    12:05   1:29 postgres:
> tradein tradein_clients 130.94.20.27 COPY
> root      6476  0.0  0.0  2156  888 pts/3    S    12:39   0:00 su -
> postgres
> postgres  6478  0.0  0.1  2004 1168 pts/3    S    12:39   0:00 -bash
> postgres  7058  0.0  0.3 139200 3780 pts/3   S    12:44   0:00
> /usr/bin/postmaster -D /var/lib/pgsql/data
> postgres  7059  0.3  1.9 140808 19688 pts/3  D    12:44   0:00
> /usr/bin/postmaster -D /var/lib/pgsql/data
> postgres  7396  0.0  0.0  2324  696 pts/3    R    12:47   0:00 ps auxwww
>
> postgres  7397  0.0  0.0  1360  512 pts/3    S    12:47   0:00 grep post
>
> bash-2.03$
>
> hmmm.  two postmasters ??
>
> and perhaps the   "postgres: tradein tradein_clients 130.94.20.27 COPY"
> is the guilty one
>
> how do i get rid of that ...

I believe you want
kill -INT 3901
to get rid of the backend.


Re: Database Server in Recovery mode!

От:
Rajesh Kumar Mallah <mallah@trade-india.com>
Дата:
Hmm..

was it this simple!  thanks

what does -INT signal do  btw ??

I will try it next time  when  ( god forbids my database server crashes again
)

mallah.

Stephan Szabo wrote:

> On Thu, 25 Apr 2002, Rajesh Kumar Mallah wrote:
>
> > oops forgot to post the ps auxwww | grep "post"
> >
> > bash-2.03$ ps auxwww| grep post
> > postgres  3901  3.4  1.3 141068 13868 ?      D    12:05   1:29 postgres:
> > tradein tradein_clients 130.94.20.27 COPY
> > root      6476  0.0  0.0  2156  888 pts/3    S    12:39   0:00 su -
> > postgres
> > postgres  6478  0.0  0.1  2004 1168 pts/3    S    12:39   0:00 -bash
> > postgres  7058  0.0  0.3 139200 3780 pts/3   S    12:44   0:00
> > /usr/bin/postmaster -D /var/lib/pgsql/data
> > postgres  7059  0.3  1.9 140808 19688 pts/3  D    12:44   0:00
> > /usr/bin/postmaster -D /var/lib/pgsql/data
> > postgres  7396  0.0  0.0  2324  696 pts/3    R    12:47   0:00 ps auxwww
> >
> > postgres  7397  0.0  0.0  1360  512 pts/3    S    12:47   0:00 grep post
> >
> > bash-2.03$
> >
> > hmmm.  two postmasters ??
> >
> > and perhaps the   "postgres: tradein tradein_clients 130.94.20.27 COPY"
> > is the guilty one
> >
> > how do i get rid of that ...
>
> I believe you want
> kill -INT 3901
> to get rid of the backend.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


FAQ