Re: [ADMIN] moving database to diff. server

2005-06-28 Thread Tom Arthurs
use initdb to create the cluster (including the template db's), if you haven't already done so. Paul Keyes wrote: Hi All, I'm confused about one aspect of backing up and moving a database to a different server. I've used pg_dump to dump the database and moved he resulting file to the new serve

Re: [ADMIN] vacuum taking longer over time

2005-06-28 Thread Matthew T. O'Connor
Enzo D'addario wrote: Hi All, I currently have postgres 7.4.2 running on a dedicated server which has 1GB RAM, a Pentium 4 2600 Mhz processor, uses ReiserFS filesystem and is running Debian stable. After approximately 1 month I have to dump & restore the database because vacuum time spirals ou

Re: [ADMIN] pg_dump -Fc does not dump indexes

2005-06-28 Thread Michael Fuhr
On Fri, Jun 24, 2005 at 08:02:40PM -0700, Alberto wrote: > > I have tried to backup my postgres database with >pg_dump -Fc $db > ~/backups/$db.backup.c > and restore it with: >createdb -U postgres -D aestel_admin -T template0 restoreTMP >pg_restore -d restoreTMP -U postgres $db.backup.c

Re: [ADMIN] How to compare the schemas ?

2005-06-28 Thread KÖPFERL Robert
diff speaks the wrong language to accomplish that, other elementry parts. There exists a program named pgdiff on gborg. On the other hand there's EMS database comparer http://www.sqlmanager.net/ |-Original Message- |From: Milorad Poluga [mailto:[EMAIL PROTECTED] |Sent: Donnerstag, 23. Ju

Re: [ADMIN] How to compare the schemas ?

2005-06-28 Thread Peter Eisentraut
Milorad Poluga wrote: > One (certainly not the best options) is to do something like this: > > pg_dump ... DB1  > PG_SCHEMA1 > pg_dump ... DB2  > PG_SCHEMA2 > diff  PG_SCHEMA1  PG_SCHEMA2  > differences.txt What is wrong with that? -- Peter Eisentraut http://developer.postgresql.org/~petere/ --

[ADMIN] Direct I/O versus OS-Caching

2005-06-28 Thread KÖPFERL Robert
Yeah, as the subject quetiones. What's the better/faster alternative? Enabling OS-file system caching or disabling it and forcing direct I/O? ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [ADMIN] Direct I/O versus OS-Caching

2005-06-28 Thread Peter Eisentraut
KÖPFERL Robert wrote: > What's the better/faster alternative? > Enabling OS-file system caching or disabling it and forcing direct > I/O? PostgreSQL is designed to rely on OS file-system caching, so you better not turn that off. -- Peter Eisentraut http://developer.postgresql.org/~petere/

Re: [ADMIN] How to compare the schemas ?

2005-06-28 Thread Ian FREISLICH
Peter Eisentraut wrote: > Milorad Poluga wrote: > > One (certainly not the best options) is to do something like this: > > > > pg_dump ... DB1 =A0> PG_SCHEMA1 > > pg_dump ... DB2 =A0> PG_SCHEMA2 > > diff =A0PG_SCHEMA1 =A0PG_SCHEMA2 =A0> differences.txt > > What is wrong with that? All the extra T

[ADMIN] change existing table definition

2005-06-28 Thread Chuming Chen
Hi, all, How can I change the column definition of an existing table, ie. from varchar(30) to varchar(50)? Is there any way to add a new column to an existing table? Thank you for your suggestions. Chuming Chen ---(end of broadcast)--- TIP 7:

Re: [ADMIN] change existing table definition

2005-06-28 Thread Peter Eisentraut
Chuming Chen wrote: > How can I change the column definition of an existing table, ie. from > varchar(30) to varchar(50)? Is there any way to add a new column to > an existing table? The ALTER TABLE command can do all that. You need version 8.0 or later for some functionality though. -- Peter

Re: [ADMIN] change existing table definition

2005-06-28 Thread Chuming Chen
Peter Eisentraut wrote: Chuming Chen wrote: How can I change the column definition of an existing table, ie. from varchar(30) to varchar(50)? Is there any way to add a new column to an existing table? The ALTER TABLE command can do all that. You need version 8.0 or later for some fu

Re: [ADMIN] change existing table definition

2005-06-28 Thread Michael Fuhr
On Tue, Jun 28, 2005 at 09:27:32AM -0400, Chuming Chen wrote: > > How can I change the column definition of an existing table, ie. from > varchar(30) to varchar(50)? Is there any way to add a new column to an > existing table? See ALTER TABLE in the documentation and "How do you change a column

Re: [ADMIN] change existing table definition

2005-06-28 Thread Johannes Lochmann
On Tuesday 28 June 2005 15:27, Chuming Chen wrote: Hello, > How can I change the column definition of an existing table, ie. from > varchar(30) to varchar(50)? You did not mention any version, so for 8.0.x: alter table t alter col type varchar(50); > Is there any way to add a new column to an

Re: [ADMIN] change existing table definition

2005-06-28 Thread Lee Wu
In PG 7, you can add column like: create table test (c1 varchar(30)); alter table test add column c2 int; select version(); version - PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.96 (1 row) I do not

Re: [ADMIN] How to compare the schemas ?

2005-06-28 Thread Scott Marlowe
On Tue, 2005-06-28 at 08:32, Ian FREISLICH wrote: > Peter Eisentraut wrote: > > Milorad Poluga wrote: > > > One (certainly not the best options) is to do something like this: > > > > > > pg_dump ... DB1 =A0> PG_SCHEMA1 > > > pg_dump ... DB2 =A0> PG_SCHEMA2 > > > diff =A0PG_SCHEMA1 =A0PG_SCHEMA2 =A0

Re: [ADMIN] change existing table definition

2005-06-28 Thread Martin Fandel
Aehm sorry. ALTER TABLE is not only in PostgreSQL 8 ;). Only the datatypes can be changed in postgres 8 (right?). I answered to fast. I'm sorry. CREATE TABLE newtable ( "bla" varchar(50)); CREATE INDEX/TRIGGER/... (with different names as the production table) INSERT INTO newtable (select * from p

Re: [ADMIN] change existing table definition

2005-06-28 Thread Martin Fandel
Hi ALTER TABLE is only in PostgreSQL 8. But you can create a new table with varchar(50) and copy the data from the existing into the new table. How much relation_size has your table? Do you create the dbsize-functions which are included in the contrib package? Best regards, Martin Am Dienstag,

Re: [ADMIN] change existing table definition

2005-06-28 Thread Brad Nicholson
Chuming Chen wrote: Peter Eisentraut wrote: Chuming Chen wrote: How can I change the column definition of an existing table, ie. from varchar(30) to varchar(50)? Is there any way to add a new column to an existing table? The ALTER TABLE command can do all that. You need version 8.0

Re: [ADMIN] Poolin' it

2005-06-28 Thread Chris Browne
[EMAIL PROTECTED] (Kris Kiger) writes: > Howdy all. I'm doing some research on 'middleware' type connection > pooling, such as pgpool. I'm having some trouble finding other > options that are actively being maintained, whether it be by the > open source community or not. Can anyone point me to s

Re: [ADMIN] change existing table definition

2005-06-28 Thread Chuming Chen
Hi, Thanks a lot for your quick reply and help. The following is what I find from google. Will it work? A quicker solution would be to use the pg_dump command to dump the table, change the needed columns and restore everything. pg_dump -c -t > psql < Regards, Chuming Martin Fandel

Re: [ADMIN] change existing table definition

2005-06-28 Thread Martin Fandel
> pg_dump -c -t > > psql < I don't tested this but i think this works. Be dangerous with the "-c" Option of dump ;). After the dump was created, new data could be inserted into the database. If you dump in the file, all dumped tables are dropped. It's better to RENAME the existing table and