Обсуждение: Hi,

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

Hi,

От
"Brian Kitzberger"
Дата:
Hi,

I am a new user testing this open-source database and I have a few
questions.  I was able to install PostgreSQL version 8.1.3 on Linux
version 9 using the simple install script provided.  I created a simple
database and populated the database with some data.  The inserts,
select, delete, drop, etc. commands work great.  So I was testing the
back up process and ran into a few problems.  When I ran the pg_dump it
said my pg_dump version was outdated and that I need to use the option
-i.  When I did I get "pg_dump: server version: 8.1.3; pg_dump version:
7.4.8"

1 Why are the version different?  I have no other installs of this
product.

The dump also failed with this error:

Error message from server: ERROR: column "datpath" does not exist
The commend was: SELECT (SELECT username FROM pg_user WHERE usesysid =
datdba) as dba, pg_encoding_to_char(encoding) as encoding, datpath FROM
pg_database WHERE datname = "test"

2 There is no reference to what "datpath" is?  Can some one explain
what it is, used for, and what to set it to?

Brian

Re: Hi,

От
Tom Lane
Дата:
"Brian Kitzberger" <KITZBERGERB@mail.co.stanislaus.ca.us> writes:
> When I did I get "pg_dump: server version: 8.1.3; pg_dump version:
> 7.4.8"

Apparently you already had a 7.4.8 postgres installed on your machine.
Most versions of Linux do have PG in them.  You probably want to remove
the 7.4.8 files to avoid confusion like this.

> The dump also failed with this error:
> Error message from server: ERROR: column "datpath" does not exist

That's because that version of pg_dump is too old to understand the 8.1
server's catalog layout.  There's a good reason why it refused to dump
from a newer server by default; it knows it probably ain't gonna work.

            regards, tom lane

Re: Hi,

От
"Brian Kitzberger"
Дата:
Hi Tom,

I decided to test your theory that I had an old version of Postgres on
my system when I installed version 8.1.3.  By the way, the Linux install
we a fresh one to start with.  So this morning I first did a search on
my system for all pg_dump files, and wrote the locations down.  I them
removed the entire file structure of postgresql-8.1.3 from my system.  I
then did a system search for pg_dump again to confirm that all files by
the name of pg_dump were removed, which they were.  I then re-installed
PostgreSQL version 8.1.3.  After completing, I did a system search for
the pg_dump again and found them in the locations I expected.  I them
recreated my database and tested the pg_dump.  I got the same error.
Version mismatch with the same version numbers as before.  I think that
an old version of pg_dump is bundled up with the install of version
8.1.3.  How can I get the correct version of pg_dump?  Or any of the
other files that are not the correct version?

Brian


>>> Tom Lane <tgl@sss.pgh.pa.us> 3/22/2006 2:38 PM >>>
"Brian Kitzberger" <KITZBERGERB@mail.co.stanislaus.ca.us> writes:
> When I did I get "pg_dump: server version: 8.1.3; pg_dump version:
> 7.4.8"

Apparently you already had a 7.4.8 postgres installed on your machine.
Most versions of Linux do have PG in them.  You probably want to
remove
the 7.4.8 files to avoid confusion like this.

> The dump also failed with this error:
> Error message from server: ERROR: column "datpath" does not exist

That's because that version of pg_dump is too old to understand the
8.1
server's catalog layout.  There's a good reason why it refused to dump
from a newer server by default; it knows it probably ain't gonna work.

            regards, tom lane

---------------------------(end of
broadcast)---------------------------
TIP 6: explain analyze is your friend

Re: Hi,

От
Steve Crawford
Дата:
Brian Kitzberger wrote:
> Hi Tom,
>
> I decided to test your theory that I had an old version of Postgres on
> my system when I installed version 8.1.3.  By the way, the Linux install
> we a fresh one to start with.  So this morning I first did a search on
> my system for all pg_dump files, and wrote the locations down.  I them
> removed the entire file structure of postgresql-8.1.3 from my system.  I
> then did a system search for pg_dump again to confirm that all files by
> the name of pg_dump were removed, which they were.  I then re-installed
> PostgreSQL version 8.1.3.  After completing, I did a system search for
> the pg_dump again and found them in the locations I expected.  I them
> recreated my database and tested the pg_dump.  I got the same error.
> Version mismatch with the same version numbers as before.  I think that
> an old version of pg_dump is bundled up with the install of version
> 8.1.3.  How can I get the correct version of pg_dump?  Or any of the
> other files that are not the correct version?

What is the result of the following:
pg_dump --version
pg_dumpall --version
psql --version
which pg_dump
which pg_dumpall
which psql

What method did you use to search for files?

Cheers,
Steve

Re: Hi,

От
Scott Marlowe
Дата:
On Thu, 2006-03-23 at 13:03, Brian Kitzberger wrote:
> Hi Tom,
>
> I decided to test your theory that I had an old version of Postgres on
> my system when I installed version 8.1.3.  By the way, the Linux install
> we a fresh one to start with.  So this morning I first did a search on

OK, assuming you're on a package based system (I seem to remember seeing
redhat earlier)  you check to see if something is installed or not is
with RPM.

try this:

rpm -qa | grep -i postgres

and see what you get.