[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

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

[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

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 amitj...@synechron.com 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

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 this

Re: [ADMIN] future development of xml capabilities

2010-05-27 Thread Kevin Grittner
Kasia Tuszynska ktuszyn...@esri.com 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

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

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 imarti...@vectorsf.com 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

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

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
alvherre alvhe...@commandprompt.com 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

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 alvhe...@commandprompt.com 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

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 imarti...@vectorsf.com 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

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
alvherre alvhe...@commandprompt.com 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

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 alvhe...@commandprompt.com 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.

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
Ray Stell ste...@cns.vt.edu 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

Re: [ADMIN] command tag logging

2010-05-27 Thread Tom Lane
Ray Stell ste...@cns.vt.edu 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