[ADMIN] Corrupted database - how to recover

2010-05-27 Thread Johann Spies
After two disks on our raid-5 system failed causing a filesystem failure. We could get one online again and the filesystem is at present usable but I cannot start postgresql at the moment: $ /usr/lib/postgresql/8.3/bin/postgres --single -D /etc/postgresql/8.3/main/ 2010-05-27 09:22:48 SAST FATAL

Re: [ADMIN] Corrupted database - how to recover

2010-05-27 Thread Andreas Schmitz
hi johann, maybe you should consider using point in time recovery (pitr) if the database is mission critical. http://www.postgresql.org/docs/8.4/interactive/continuous-archiving.html regards andreas Johann Spies wrote: After two disks on our raid-5 system failed causing a filesystem fai

[ADMIN] How to add constraints without validating data.

2010-05-27 Thread Amit jain
Hi Gurus Is there any way in postgreSQL to apply constraints forcefully without checking/validating Data ? It should validate only those records which comes after constraints are applied. I need this help as data is already loaded in database but "ALTER TABLE" sql for adding CONSTRAINTS is t

Re: [ADMIN] How to add constraints without validating data.

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 5:55 PM, Amit jain wrote: > Hi Gurus > > Is there any way in postgreSQL to apply constraints forcefully without > checking/validating Data ? It should validate only those records which comes > after constraints are applied. > > I need this help as data is already loaded in

Re: [ADMIN] Corrupted database - how to recover

2010-05-27 Thread Johann Spies
On Thu, May 27, 2010 at 09:54:00AM +0200, Andreas Schmitz wrote: > > maybe you should consider using point in time recovery (pitr) if the > database is mission critical. > > http://www.postgresql.org/docs/8.4/interactive/continuous-archiving.html Thanks. This is the first time I experienced thi

Re: [ADMIN] future development of xml capabilities

2010-05-27 Thread Kevin Grittner
Kasia Tuszynska wrote: > I was wondering if there were any plans to implement indexing on a > xpath expression in future releases on Postges like Postgres 9? I wouldn't be surprised if that eventually gets added, but I don't recall seeing any discussion of doing so anytime soon. To see the li

Re: [ADMIN] How to add constraints without validating data.

2010-05-27 Thread Iñigo Martinez Lasala
You have to disable triggers. Two options: - Export table data, truncate table (if your table is fk source you will have a problem), add constraint and import exported data with --disable-triggers flag in pg_restore. - Perhaps you could add manually triger via pg_trigger table in pg_catalog whit

Re: [ADMIN] How to add constraints without validating data.

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 9:30 PM, Iñigo Martinez Lasala wrote: > You have to disable triggers. > > Two options: > > - Export table data, truncate table (if your table is fk source you will > have a problem), add constraint and import exported data with > --disable-triggers flag in pg_restore. > > -

Re: [ADMIN] How to add constraints without validating data.

2010-05-27 Thread Iñigo Martinez Lasala
Constraints are special triggers, but triggers anyway. So, If you truncate the table, create the contraint and then restore with triggers disabled, it could be faster that create the contraint and wait until it checks all table data... or not... :) -Original Message- From: Nilesh Govind

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
alvherre writes: > Excerpts from Ray Stell's message of mié may 26 17:08:33 -0400 2010: >> I just installed a compiled from src 8.3.11. I usually include %i, command >> tag, >> in the log_line_prefix setting. This causes some spewage I'd not seen before >> on connection received lines as if it

Re: [ADMIN] command tag logging

2010-05-27 Thread alvherre
Excerpts from Tom Lane's message of jue may 27 12:49:49 -0400 2010: > alvherre writes: > > Excerpts from Ray Stell's message of mié may 26 17:08:33 -0400 2010: > >> I just installed a compiled from src 8.3.11. I usually include %i, > >> command tag, > >> in the log_line_prefix setting. This cau

Re: [ADMIN] How to add constraints without validating data.

2010-05-27 Thread Nilesh Govindarajan
On Thu, May 27, 2010 at 9:49 PM, Iñigo Martinez Lasala wrote: > Constraints are special triggers, but triggers anyway. > > So, If you truncate the table, create the contraint and then restore with > triggers disabled, it could be faster that create the contraint and wait > until it checks all tabl

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
alvherre writes: > Excerpts from Tom Lane's message of jue may 27 12:49:49 -0400 2010: >> That is in the right place, isn't it. That would suggest that >> get_ps_display() is returning a wrong length on Ray's machine. >> It works okay here, but since that's platform-specific code that >> hardly p

Re: [ADMIN] command tag logging

2010-05-27 Thread Ray Stell
On Thu, May 27, 2010 at 12:49:49PM -0400, Tom Lane wrote: > alvherre writes: > > Excerpts from Ray Stell's message of mi?? may 26 17:08:33 -0400 2010: > >> I just installed a compiled from src 8.3.11. I usually include %i, > >> command tag, > >> in the log_line_prefix setting. This causes some

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
Ray Stell writes: > On Thu, May 27, 2010 at 12:49:49PM -0400, Tom Lane wrote: >> That is in the right place, isn't it. That would suggest that >> get_ps_display() is returning a wrong length on Ray's machine. >> It works okay here, but since that's platform-specific code that >> hardly proves muc

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
Ray Stell writes: > I just installed a compiled from src 8.3.11. I usually include %i, command > tag, > in the log_line_prefix setting. This causes some spewage I'd not seen before > on connection received lines as if it is dumping the environment: Fix is here if you need it quick: http://arch

Re: [ADMIN] How to add constraints without validating data.

2010-05-27 Thread Robert Voinea
Why don't you use a partition? Create another table that inherits from the table and add your new constraints to the new table. On Thursday 27 May 2010 19:32:33 Nilesh Govindarajan wrote: > On Thu, May 27, 2010 at 9:49 PM, Iñigo Martinez Lasala > > wrote: > > Constraints are special triggers,