Re: SQL_ASCII / LATIN1 - Mailing list pgsql-novice

From Aarni Ruuhimäki
Subject Re: SQL_ASCII / LATIN1
Date
Msg-id 200401150302.38280.aarni.ruuhimaki@kymi.com
Whole thread Raw
In response to Re: SQL_ASCII / LATIN1  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.ruuhimaki@kymi.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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

pgsql-novice by date:

Previous
From: Lduren02@aol.com
Date:
Subject: installing postgre
Next
From: dj00302003@yahoo.com (Jay Davis)
Date:
Subject: How to turn flat file to SQL