Thread: accessing a db

accessing a db

From
João Carlos Fernandes Costa
Date:
Hi,

I have installed postgresql and I have a db called template1.
I closed cygwin's window and when I re-opened it, I try to re-access the db
template1 unsuccessfully.
How can I do it? What is the command sequence for it?

Thanks,
Joao

Re: accessing a db

From
"Andy Samuel"
Date:
Assuming you have the latest postgresql and cygwin :

type 'ipc-daemon &'
type 'pg_ctl -o -i -D /usr/share/postgresql/data'
type 'psql template1'

Read the documentation at /usr/doc/Cygwin/

Good luck
----- Original Message -----
From: "João Carlos Fernandes Costa" <joao.costa@oni.pt>
To: <pgsql-cygwin@postgresql.org>
Sent: Saturday, April 27, 2002 12:40 AM
Subject: [CYGWIN] accessing a db


> Hi,
>
> I have installed postgresql and I have a db called template1.
> I closed cygwin's window and when I re-opened it, I try to re-access the
db
> template1 unsuccessfully.
> How can I do it? What is the command sequence for it?
>
> Thanks,
> Joao
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>




Re: accessing a db

From
"Andy Samuel"
Date:
I'm sorry, the second line should be :

type 'pg_ctl start -o -i -D /usr/share/postgresql/data'

I forgot to put the 'start' option

Good luck
----- Original Message -----
From: "Andy Samuel" <anci@centrin.net.id>
To: <pgsql-cygwin@postgresql.org>
Sent: Saturday, April 27, 2002 1:16 PM
Subject: Re: [CYGWIN] accessing a db


> Assuming you have the latest postgresql and cygwin :
>
> type 'ipc-daemon &'
> type 'pg_ctl -o -i -D /usr/share/postgresql/data'
> type 'psql template1'
>
> Read the documentation at /usr/doc/Cygwin/
>
> Good luck
> ----- Original Message -----
> From: "João Carlos Fernandes Costa" <joao.costa@oni.pt>
> To: <pgsql-cygwin@postgresql.org>
> Sent: Saturday, April 27, 2002 12:40 AM
> Subject: [CYGWIN] accessing a db
>
>
> > Hi,
> >
> > I have installed postgresql and I have a db called template1.
> > I closed cygwin's window and when I re-opened it, I try to re-access the
> db
> > template1 unsuccessfully.
> > How can I do it? What is the command sequence for it?
> >
> > Thanks,
> > Joao
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>




Re: accessing a db

From
João Carlos Fernandes Costa
Date:
Hi Andy,

I try your command sequence, but when I typed the second line I got the
following:

    pg_ctl: Another postmaster may be running.  Trying to start
postmaster anyway.
    pg_ctl: cannot start postmaster
    Examine the log output.
    [3]+  Done                    ipc-daemon

Any ideas?

Thanks,
Joao

-----Original Message-----
From: Andy Samuel [mailto:andysamuel@myrealbox.com]
Sent: s�bado, 27 de Abril de 2002 7:21
To: pgsql-cygwin@postgresql.org
Subject: Re: [CYGWIN] accessing a db


I'm sorry, the second line should be :

type 'pg_ctl start -o -i -D /usr/share/postgresql/data'

I forgot to put the 'start' option

Good luck
----- Original Message -----
From: "Andy Samuel" <anci@centrin.net.id>
To: <pgsql-cygwin@postgresql.org>
Sent: Saturday, April 27, 2002 1:16 PM
Subject: Re: [CYGWIN] accessing a db


> Assuming you have the latest postgresql and cygwin :
>
> type 'ipc-daemon &'
> type 'pg_ctl -o -i -D /usr/share/postgresql/data'
> type 'psql template1'
>
> Read the documentation at /usr/doc/Cygwin/
>
> Good luck
> ----- Original Message -----
> From: "Jo�o Carlos Fernandes Costa" <joao.costa@oni.pt>
> To: <pgsql-cygwin@postgresql.org>
> Sent: Saturday, April 27, 2002 12:40 AM
> Subject: [CYGWIN] accessing a db
>
>
> > Hi,
> >
> > I have installed postgresql and I have a db called template1.
> > I closed cygwin's window and when I re-opened it, I try to re-access the
> db
> > template1 unsuccessfully.
> > How can I do it? What is the command sequence for it?
> >
> > Thanks,
> > Joao
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Re: accessing a db

From
"Andy Samuel"
Date:
May be you did not shutdown the database when the last time you start it.

Try this :
1.  type 'ps -a' .  Can you see any 'postgres'  in the 'command' column ?
If not proceed to no. 2
2.  type 'rm /usr/share/postgresql/data/postmaster.pid'

Each time PostgreSQL runs, it creates the
/usr/share/postgresql/data/postmaster.pid.
If you shutdown the database cleanly, the file will be deleted.
Upon starting the postmaster, PostgreSQL check this file, if the file exist,
then it is a sign that a postmaster already running.

Everytime you're done working with Cygwin + PostgreSQL, use this command to
cleanly shutdown the postmaster :
'pg_ctl stop -D /usr/share/postgresq/data'

Hey...I hope this is not a production server.
I can not bear the responsible any lost of your data.

Good luck.

----- Original Message -----
From: "João Carlos Fernandes Costa" <joao.costa@oni.pt>
To: "'Andy Samuel'" <andysamuel@myrealbox.com>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Monday, April 29, 2002 4:09 PM
Subject: Re: [CYGWIN] accessing a db


> Hi Andy,
>
> I try your command sequence, but when I typed the second line I got the
> following:
>
> pg_ctl: Another postmaster may be running.  Trying to start
> postmaster anyway.
> pg_ctl: cannot start postmaster
> Examine the log output.
> [3]+  Done                    ipc-daemon
>
> Any ideas?
>
> Thanks,
> Joao





Re: accessing a db

From
João Carlos Fernandes Costa
Date:
Andy,

Thanks a lot for your help. Everything is working great.

Joao

-----Original Message-----
From: Andy Samuel [mailto:andysamuel@myrealbox.com]
Sent: ter�a-feira, 30 de Abril de 2002 3:33
To: pgsql-cygwin@postgresql.org
Subject: Re: [CYGWIN] accessing a db


May be you did not shutdown the database when the last time you start it.

Try this :
1.  type 'ps -a' .  Can you see any 'postgres'  in the 'command' column ?
If not proceed to no. 2
2.  type 'rm /usr/share/postgresql/data/postmaster.pid'

Each time PostgreSQL runs, it creates the
/usr/share/postgresql/data/postmaster.pid.
If you shutdown the database cleanly, the file will be deleted.
Upon starting the postmaster, PostgreSQL check this file, if the file exist,
then it is a sign that a postmaster already running.

Everytime you're done working with Cygwin + PostgreSQL, use this command to
cleanly shutdown the postmaster :
'pg_ctl stop -D /usr/share/postgresq/data'

Hey...I hope this is not a production server.
I can not bear the responsible any lost of your data.

Good luck.

----- Original Message -----
From: "Jo�o Carlos Fernandes Costa" <joao.costa@oni.pt>
To: "'Andy Samuel'" <andysamuel@myrealbox.com>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Monday, April 29, 2002 4:09 PM
Subject: Re: [CYGWIN] accessing a db


> Hi Andy,
>
> I try your command sequence, but when I typed the second line I got the
> following:
>
> pg_ctl: Another postmaster may be running.  Trying to start
> postmaster anyway.
> pg_ctl: cannot start postmaster
> Examine the log output.
> [3]+  Done                    ipc-daemon
>
> Any ideas?
>
> Thanks,
> Joao





---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org