Re: How to connect to a database psql doesn't see

Поиск
Список
Период
Сортировка
От Michael Swierczek
Тема Re: How to connect to a database psql doesn't see
Дата
Msg-id CAHp1f1MdsnyPsm85fUAoaafkD7jH362wE1dngGEg7CMXQdBiXw@mail.gmail.com
обсуждение исходный текст
Ответ на How to connect to a database psql doesn't see  (Mick <mickg01@verizon.net>)
Список pgsql-novice
On Fri, Jan 3, 2014 at 3:50 PM, Mick <mickg01@verizon.net> wrote:
> I have a database (timetrex), which is accessed via a web page, located
> on an Ubuntu 12.04 Sever. I can trace all the files and it's producing a
> regular .sql backup file each day (or maybe each time it is accessed via
> the web page).
> When I attempt to access it using the psql -l command as user Postgres
> it does not show.
>
> Over time timetrex seems to have created a Postgres 8.3 database and a
> postgres 9.1 database in the /var data path and neither shows up.
>
> Before I update timetrex to the latest version I would like to know that
> in an extreme case I can run the .sql backups to restore my data but to
> do that I need to be able to see the database.
>
> Is there a way to run the postgres client pointing to the path for the
> database files I have identified so it does see my timetrex database?
>
> Thanks
>
> Mick
>

If the databases do not appear when you do a psql -l, is it possible
they are running on another port instead of the standard 5432?  If you
have not done it already, please locate your postgresql.conf file and
see what TCP port Postgres is using.  Maybe you have the 8.3 and 9.1,
and whichever one you connect to by default has nothing on it, and the
other one on a different port has the Timetrex database.

I haven't run Postgres on Linux in a while, but I think the following
command will help you figure out what is running:
ps -ef | grep pg_ctl
The output should give you the pg_ctl commands controlling any
currently-running versions of Postgres, including the data directory
they use.  Again, though, I'm rusty so that could be wrong (and for
all I know you've forgotten more about being a Linux/Unix admin than
I'll ever know.)

That's just a guess.
-Mike


>
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice


В списке pgsql-novice по дате отправления:

Предыдущее
От: Mick
Дата:
Сообщение: How to connect to a database psql doesn't see
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: convert query from mysql