Обсуждение: Re: postgresql upgrade/downgrade -- help!

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

Re: postgresql upgrade/downgrade -- help!

От
will trillich
Дата:
Oliver Elphick wrote:
> will trillich wrote:
>   >-rw-------    1 postgres postgres        4 Feb 27 12:24 PG_VERSION
>   >-rw-------    1 postgres postgres        0 Oct 13 21:05 active
>   >-rw-------    1 postgres postgres     8192 Feb 27 04:00 cust
>   >-rw-------    1 postgres postgres    16384 Feb 22 00:35 cust_handle_key
>   >-rw-------    1 postgres postgres     8192 Feb 22 00:35 cust_id_seq
>   >-rw-------    1 postgres postgres    16384 Feb 22 00:35 cust_sendto_idx
>   >-rw-------    1 postgres postgres    16384 Feb 22 00:35 cust_source_idx
>   >-rw-------    1 postgres postgres        0 Oct  4 21:24 exp
>   >-rw-------    1 postgres postgres        0 Oct  4 21:13 ponly
>   >-rw-------    1 postgres postgres     8192 Feb 27 04:00 puzct
>   >-rw-------    1 postgres postgres        0 Sep 29 12:01 puzno
>   >-rw-------    1 postgres postgres     8192 Feb 27 04:00 range
>   >-rw-------    1 postgres postgres    16384 Feb 11 07:39 range_pkey
>   >-rw-------    1 postgres postgres     8192 Aug  5  2000 sell
>   >-rw-------    1 postgres postgres    16384 Aug  5  2000 sell_id_idx
>   >-rw-------    1 postgres postgres        0 Oct  1 11:52 tot
>   >-rw-------    1 postgres postgres        0 Oct 13 21:04 unconf
>   >
>   >unconf, tot, puzno, ponly, exp, active are views; the *idx/*key are
>   >indexes, *seq is the one sequence, and the rest are tables.

and according to the automatic_upgrade.log file elsewhere, it
first balked at datatypes needing explicit casts (as if reading
a sql source file from a database dump, which i can't seem to find)
and then died when unable to load plpgsql.so (or something along
those lines). if i can find that dump sql file, i'm all set!

>   >actually, i think the 'range' table is the main one i need to
>   >resurrect... everything else is gravy.
>
> What exactly is missing from it?  It seems to have data in it, by its
> size...

my thoughts exactly.

\d shows this:
    Name     |   Type   | Owner
-------------+----------+-------
 active      | view     | will
 cust        | table    | will
 cust_id_seq | sequence | will
 exp         | view     | will
 paid        | table    | will
 ponly       | view     | will
 puzno       | table    | will
 sell        | table    | will
 tot         | table    | will
 unconf      | view     | will
(10 rows)

altho "puzct" and "range" are listed in /var/lib/postgresql/data/base/puz/
they don't show up as contributing members of society... and of course,
those are the two i'd like to get my knuckles into!

--

thanks for your help, oliver, here and in the past! i'd still be stuck
way back in the dark ages without your patient direction....

--
mailto:will@serensoft.com
http://www.dontUthink.com/

Re: postgresql upgrade/downgrade -- help!

От
"Oliver Elphick"
Дата:
will trillich wrote:
  >>   >-rw-------    1 postgres postgres     8192 Feb 27 04:00 range
  >>   >-rw-------    1 postgres postgres    16384 Feb 11 07:39 range_pkey

  >>   >actually, i think the 'range' table is the main one i need to
  >>   >resurrect... everything else is gravy.
  >>
  >> What exactly is missing from it?  It seems to have data in it, by its
  >> size...
  >
  >my thoughts exactly.
  >
  >\d shows this:
  >    Name     |   Type   | Owner
  >-------------+----------+-------
  > active      | view     | will
  > cust        | table    | will
  > cust_id_seq | sequence | will
  > exp         | view     | will
  > paid        | table    | will
  > ponly       | view     | will
  > puzno       | table    | will
  > sell        | table    | will
  > tot         | table    | will
  > unconf      | view     | will
  >(10 rows)
  >
  >altho "puzct" and "range" are listed in /var/lib/postgresql/data/base/puz/
  >they don't show up as contributing members of society... and of course,
  >those are the two i'd like to get my knuckles into!

A pity the dump file got clobbered.  I suspect the dump from 6.5 was
in a form that 7.0 rejected - you had those two failed creates in the
log.

Try this:

   rename range and range.pkey

   Recreate range

   Overwrite the new range and range.pkey with the old files

If that does not work, I think I have seen a reference on one of the
PostgreSQL lists to a tool for extracting tuples from a file.  I can't
remember where, though.  Can anyone point us to it?


--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "These things have I written unto you that believe on
      the name of the Son of God; that ye may know that ye
      have eternal life, and that ye may believe on the name
      of the Son of God."        I John 5:13



postgresql upgrade/downgrade: the data is BACK! but...

От
will trillich
Дата:
On Wed, Feb 28, 2001 at 06:52:01AM +0000, Oliver Elphick wrote:
> A pity the dump file got clobbered.

indeed!

> I suspect the dump from 6.5 was
> in a form that 7.0 rejected - you had those two failed creates in the
> log.

the problem was apparently
    DEFAULT TEXT 'CURRENT_DATE'
in the date fields...

> Try this:
>
>    rename range and range.pkey
>
>    Recreate range
>
>    Overwrite the new range and range.pkey with the old files

     _/_/_/_/   _/_/_/   _/_/_/  _/       _/
   _/         _/    _/ _/    _/ _/       _/
  _/         _/    _/ _/    _/ _/       _/
 _/         _/    _/ _/    _/ _/
 _/_/_/_/   _/_/_/   _/_/_/  _/_/_/_/ _/

thankyouthankyouthankyou.  i promise to do regular backups.  i
promise to do regular backups.  i promise to do regular backups.
i promise to do regular backups.  i promise to do regular
backups.  i promise to do regular backups.  i promise to do
regular backups...  where's the pepto-bismol? :)

--

NOW if i can just get PERL to work with DBD::Pg again, i'd
be done! this is gonna be fun to track down now that my data
is back...

Can't load '/usr/local/lib/site_perl/i386-linux/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.2.0: cannot open shared
objectfile: No such file or directory at /usr/lib/perl5/5.005/i386-linux/DynaLoader.pm line 169. 

--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
        -- Isaac Asimov, 'The Genetic Code'

will@serensoft.com
http://groups.yahoo.com/group/newbieDoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Re: postgresql upgrade/downgrade: the data is BACK! but...

От
"Oliver Elphick"
Дата:
will trillich wrote:
  >On Wed, Feb 28, 2001 at 06:52:01AM +0000, Oliver Elphick wrote:
  >> A pity the dump file got clobbered.
  >
  >indeed!
  >
  >> I suspect the dump from 6.5 was
  >> in a form that 7.0 rejected - you had those two failed creates in the
  >> log.
  >
  >the problem was apparently
  >    DEFAULT TEXT 'CURRENT_DATE'
  >in the date fields...
  >
  >> Try this:
  >>
  >>    rename range and range.pkey
  >>
  >>    Recreate range
  >>
  >>    Overwrite the new range and range.pkey with the old files
  >
  >     _/_/_/_/   _/_/_/   _/_/_/  _/       _/
  >   _/         _/    _/ _/    _/ _/       _/
  >  _/         _/    _/ _/    _/ _/       _/
  > _/         _/    _/ _/    _/ _/
  > _/_/_/_/   _/_/_/   _/_/_/  _/_/_/_/ _/
  >
  >thankyouthankyouthankyou.  i promise to do regular backups.  i
  >promise to do regular backups.  i promise to do regular backups.
  >i promise to do regular backups.  i promise to do regular
  >backups.  i promise to do regular backups.  i promise to do
  >regular backups...  where's the pepto-bismol? :)
  >
  >--
  >
  >NOW if i can just get PERL to work with DBD::Pg again, i'd
  >be done! this is gonna be fun to track down now that my data
  >is back...
  >
  >Can't load '/usr/local/lib/site_perl/i386-linux/auto/DBD/Pg/Pg.so' for modul
      >e DBD::Pg: libpq.so.2.0: cannot open shared object file: No such file or
      > directory at /usr/lib/perl5/5.005/i386-linux/DynaLoader.pm line 169.

If you recompile the source package of DBD this problem should go away.
The library is now libpq.so.2.1

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "These things have I written unto you that believe on
      the name of the Son of God; that ye may know that ye
      have eternal life, and that ye may believe on the name
      of the Son of God."        I John 5:13



Re: Re: the data is BACK! but... SOLVED!

От
will trillich
Дата:
On Wed, Feb 28, 2001 at 09:31:35AM +0000, Oliver Elphick wrote:
> will trillich wrote:
>   >NOW if i can just get PERL to work with DBD::Pg again, i'd
>   >be done! this is gonna be fun to track down now that my data
>   >is back...
>   >
>   >Can't load '/usr/local/lib/site_perl/i386-linux/auto/DBD/Pg/Pg.so' for modul
>       >e DBD::Pg: libpq.so.2.0: cannot open shared object file: No such file or
>       > directory at /usr/lib/perl5/5.005/i386-linux/DynaLoader.pm line 169.
>
> If you recompile the source package of DBD this problem should go away.
> The library is now libpq.so.2.1

sure enough! here's how i did it -- on my debian system
using tcsh:

# apt-get install postgresql-dev
# cpan        (or 'perl -MCPAN -e shell' i think)
cpan> look DBD::Pg
# setenv POSTGRESQL_INCLUDE /usr/include/postgresql
# setenv POSTGRESQL_LIB /usr/lib/postgresql/lib
# perl Makefile.PL
# make
# make install
# ^D
cpan> q
#

oliver has saved my bacon once again... many thanks!
(maybe one day i can help someone else out of a jam... maybe)

--
It is always hazardous to ask "Why?" in science, but it is often
interesting to do so just the same.
        -- Isaac Asimov, 'The Genetic Code'

will@serensoft.com
http://groups.yahoo.com/group/newbieDoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!