Re: SQL_ASCII / LATIN1

From: Aarni Ruuhimäki <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: SQL_ASCII / LATIN1
Date: 2004-01-15 01:02:38
Message-ID: 200401150302.38280.aarni.ruuhimaki@kymi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

And thanks again Tom + all the other good folks as well.

Happily on 7.4.1 now.

Here's what I did:

Dump all (as postgres):

bash-2.05a$ /usr/local/pgsql/bin/pg_dumpall -c > all_local_for_741_c

Postgres down (as root):

#kill -9 postmaster process number

Move old datadir out of the way:

#mv /usr/share/pgdata/ /usr/share/pgdata_old

New dir for the new install:

#mkdir /usr/share/pgdata

The above for postgres:

#chown postgres /usr/share/pgdata

Any other old stuff you might find out of the way (?):

#mv /usr/share/pgsql/ /usr/share/pgsql_old

#mv /usr/local/pgsql/ /usr/local/pgsql_old

(cruel ?)

#rm -R -f /usr/include/pgsql

#rm -R -f /var/lib/pgsql

(ruthless ?)

#rm /etc/rc.d/init.d/postgres

Back to business:

#gunzip postgresql-7.4.1.tar.gz

#tar -xf postgresql-7.4.1.tar

#cd postgresql-7.4.1

(next depends on your libs etc.):

#./configure --without-zlib --enable-locale

#gmake

... Ready to install.

#gmake install

... Install succesfull.

#su postgres

bash-2.05a$/usr/local/pgsql/bin/initdb -D /usr/share/pgdata -L
/usr/local/pgsql/share -E LATIN1

bash-2.05a$/usr/local/pgsql/bin postmaster -D /usr/share/pgdata -B 128 -N 256
&

bash-2.05a$psql -E template1 < all_local_for_741_c

Rock'n'roll !

BR,

Aarni

On Wednesday 14 January 2004 17:13, you wrote:
> Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <aarni(dot)ruuhimaki(at)kymi(dot)com> writes:
> > When I pg_dump -c trouble > trouble_dump, take the file down and
> > cat trouble_dump | psql trouble it shows as LATIN1 in the local listing.
> > Then I dump it again locally, upload and cat, it shows as SQL_ASCII.
>
> I believe the default encoding for a newly-created database is the same
> encoding as template1 --- since the two installations were initdb'd with
> different default encodings, the behavior you're describing is not too
> surprising. You can specify the encoding to use when you create a
> database, though.
>
> BTW, 7.3.3 has a serious known bug in the restart logic ... you ought to
> update to 7.3.4 or 7.3.5 before you get bitten.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings

--
-------------------------------------------------
Aarni Ruuhimäki | Megative Tmi | KYMI.com

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Timo 2004-01-15 10:08:51 Discarding UNIQUE temporarily?
Previous Message glenn 2004-01-15 00:48:09 Re: probs with 7.3 -> 7.4 on debian