Re: [GENERAL] copy data from one db into another via copy psql

2010-05-21 Thread Scott Marlowe
On Thu, May 20, 2010 at 10:59 PM, Kevin Kempter kev...@consistentstate.com wrote: Can I copy from one db (via COPY) and pipe the results to a psql/COPY stmt so I can load the data into a table in the second db 'inline' without writing to reading from a flat file? That's pretty much what

Re: [GENERAL] How feasible is this?

2010-05-21 Thread Craig Ringer
On 21/05/2010 9:22 AM, Chris Smith wrote: I'm writing in desperate hope that something like this exists... because if so, it would make my life a lot easier. I want to be able to: a) Roll back a transaction b) Receive a notification when retrying the exact same transaction might cause

Re: [GENERAL] pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)

2010-05-21 Thread Glyn Astill
Well I've ony just gotten round to taking another look at this, response inline below: --- On Fri, 30/4/10, Tom Lane t...@sss.pgh.pa.us wrote: Glyn Astill glynast...@yahoo.co.uk writes: The schema is fairly large, but I will try. My guess is that you can reproduce it with not a lot of

Re: [GENERAL] pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)

2010-05-21 Thread Alban Hertroys
On 21 May 2010, at 11:58, Glyn Astill wrote: Well I've ony just gotten round to taking another look at this, response inline below: --- On Fri, 30/4/10, Tom Lane t...@sss.pgh.pa.us wrote: Glyn Astill glynast...@yahoo.co.uk writes: The schema is fairly large, but I will try. My guess

Re: [GENERAL] pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)

2010-05-21 Thread Glyn Astill
--- On Fri, 21/5/10, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: On 21 May 2010, at 11:58, Glyn Astill wrote: Well I've ony just gotten round to taking another look at this, response inline below: --- On Fri, 30/4/10, Tom Lane t...@sss.pgh.pa.us wrote: Glyn Astill

Re: [GENERAL] How to lose transaction history (xmin values, WAL, etc.)?

2010-05-21 Thread Sam Mason
On Thu, May 20, 2010 at 09:33:23PM -0500, Peter Hunsberger wrote: On Thu, May 20, 2010 at 8:03 PM, Richard Walker rich...@softimp.com.au wrote: If the hacker gets root access so they can read the raw database files, they most likely also have access to the means to decrypt any encrypted

Re: [GENERAL] pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)

2010-05-21 Thread Alban Hertroys
On 21 May 2010, at 12:44, Glyn Astill wrote: So I guess your large object is too large. Hmm, we don't use any large objects though, all our data is pretty much just date, text and numeric fields etc Doh! Seems I mixed up a few threads here. It was probably the mentioning of a 5GB file

Re: [GENERAL] How feasible is this?

2010-05-21 Thread Chris Smith
On Fri, 2010-05-21 at 16:08 +0800, Craig Ringer wrote: My non-expert feeling is that you could possibly extend a predicate locking scheme to do this. It's something that'd maybe be possible by hooking into the predicate locking schemes being being designed to support true serializability in

Re: [GENERAL] postgres startup failure

2010-05-21 Thread Tom Lane
Matt Bartolome mattxb...@gmail.com writes: On Thu, May 20, 2010 at 3:36 PM, Tom Lane t...@sss.pgh.pa.us wrote: So right now I'm wondering whether you're not failing to notice a relevant log message(s). You've evidently managed to launch the syslogger --- where is it configured to write the

Re: [GENERAL] last and/or first in a by group

2010-05-21 Thread Dino Vliet
From: Thomas Kellerer spam_ea...@gmx.net To: pgsql-general@postgresql.orgDino Vliet wrote on 16.05.2010 18:07: Dear postgresql experts, I want to know if postgresql has facilities for getting the first and or the last in a by group. Suppose I have the following table:

[GENERAL] Select max(primary_key) taking a long time

2010-05-21 Thread Francisco Reyes
Postgres 8.4.1 CentOS 5.4 I am trying to do select max(primary_key) from some_table; The explain looks like: explain select max(primary_key) from some_table; QUERY PLAN

[GENERAL] Is postgres installed?

2010-05-21 Thread christophe . andre
Hi, How I know whether Postgres is already installed or not on a machine(on Linux and Windows)? I found that pg_ctl --version could be used or I also tried to check into the registry (for windows HKLM\SOFTWARE\PostgreSQL\Installations), however with Windows Server 2003 pg_ctl is not recognized

Re: [GENERAL] Select max(primary_key) taking a long time

2010-05-21 Thread Tom Lane
Francisco Reyes li...@stringsutils.com writes: I am trying to do select max(primary_key) from some_table; Are there a whole lot of nulls in that column? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Is postgres installed?

2010-05-21 Thread Rob Richardson
What about searching your hard drive for pg_ctl.exe? RobR -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] NOTICE: ignoring incomplete trigger group for constraint

2010-05-21 Thread erobles
hi ! I have running postgres 8.3.1 and a dump file from postgers 7.2 :-P , but when i tried to restore the dump i have the next message: (by the way i made the dump file using pg_dump of postgresql 8.3) CREATE CONSTRAINT TRIGGER "valida_ent_a_sal" AFTER DELETE ON "ent_a" INITIALLY IMMEDIATE

Re: [GENERAL] How to lose transaction history (xmin values, WAL, etc.)?

2010-05-21 Thread Peter Hunsberger
On Fri, May 21, 2010 at 6:40 AM, Sam Mason s...@samason.me.uk wrote: On Thu, May 20, 2010 at 09:33:23PM -0500, Peter Hunsberger wrote: On Thu, May 20, 2010 at 8:03 PM, Richard Walker rich...@softimp.com.au wrote: If the hacker gets root access so they can read the raw database files, they

Re: [GENERAL] NOTICE: ignoring incomplete trigger group for constraint

2010-05-21 Thread Tom Lane
erobles erob...@sensacd.com.mx writes: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN [ Please don't send all-html mail to the lists ] I have running postgres 8.3.1 and a dump file from postgers 7.2 :-P , but when i tried to restore the dump i have the next message:

[GENERAL] cleaning wal files from postgres

2010-05-21 Thread erobles
which is the right procedure to clean wal files after a recovery ??

[GENERAL] getting all constraint violations

2010-05-21 Thread Gauthier, Dave
Hi: I have a table with many constraints. A user tries to insert a record that violates many of them. The error message I get back lists the first violation. How cani I (or can I) get them all? I'm running 8.3.4 on linux, running through perl/DBI, getting the error message from $dbh-errstr.

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread A. Kretschmer
In response to Gauthier, Dave : Hi: I have a table with many constraints. A user tries to insert a record that violates many of them. The error message I get back lists the first violation. How cani I (or can I) get them all? I think that isn't possible: the first violation throws

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Merlin Moncure
On Fri, May 21, 2010 at 1:27 PM, Gauthier, Dave dave.gauth...@intel.com wrote: Hi: I have a table with many constraints.  A user tries to insert a record that violates many of them.  The error message I get back lists the first violation. How cani I (or can I) get them all? the database

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Tom Lane
Gauthier, Dave dave.gauth...@intel.com writes: I have a table with many constraints. A user tries to insert a record that violates many of them. The error message I get back lists the first violation. How cani I (or can I) get them all? You can't, it stops running the command at the first

Re: [GENERAL] Select max(primary_key) taking a long time

2010-05-21 Thread Francisco Reyes
Tom Lane writes: Francisco Reyes li...@stringsutils.com writes: I am trying to do select max(primary_key) from some_table; Are there a whole lot of nulls in that column? Zero nulls. It is a primary key. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Select max(primary_key) taking a long time

2010-05-21 Thread Tom Lane
Francisco Reyes li...@stringsutils.com writes: Tom Lane writes: Francisco Reyes li...@stringsutils.com writes: I am trying to do select max(primary_key) from some_table; Are there a whole lot of nulls in that column? Zero nulls. It is a primary key. Huh. The proposed plan should have run

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Gauthier, Dave
Is there a way to temporarily suspend constraint checking for a particular constraint inside of the transaction, try the insert again, capture the next violation, then the next, etc... then rollback after all have been collected? -dave -Original Message- From: Tom Lane

Re: [GENERAL] Is postgres installed?

2010-05-21 Thread Raymond O'Donnell
On 21/05/2010 14:43, christophe.an...@elsys-design.com wrote: How I know whether Postgres is already installed or not on a machine(on Linux and Windows)? I found that pg_ctl --version could be used or I also tried to check into the registry (for windows

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Richard Broersma
On Fri, May 21, 2010 at 11:46 AM, Gauthier, Dave dave.gauth...@intel.com wrote: Is there a way to temporarily suspend constraint checking for a particular constraint inside of the transaction, try the insert again, capture the next violation, then the next, etc... then rollback after all have

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Tom Lane
Gauthier, Dave dave.gauth...@intel.com writes: Is there a way to temporarily suspend constraint checking for a particular constraint inside of the transaction, try the insert again, capture the next violation, then the next, etc... then rollback after all have been collected? You could do

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Gauthier, Dave
I'm thinking more along the lines of creating a bunch of temp tables, each with one of the constraints. Then, in a loop, throw the record at each of these temp tables and collect up the violations. Exploring now hot to get the pieces I need from the metadata tables to do this. -Original

Re: [GENERAL] cleaning wal files from postgres

2010-05-21 Thread Andreas Schmitz
erobles wrote: which is the right procedure to clean wal files after a recovery ?? which kind of recovery ? PITR or just a crash ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] cleaning wal files from postgres

2010-05-21 Thread Andreas Schmitz
erobles wrote: which is the right procedure to clean wal files after a recovery ?? what kind of recovery ? regards andreas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] cleaning wal files from postgres

2010-05-21 Thread erobles
PITR recovery On 05/21/2010 03:04 PM, Andreas Schmitz wrote: erobles wrote: which is the right procedure to clean wal files after a recovery ?? what kind of recovery ? regards andreas -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] cleaning wal files from postgres

2010-05-21 Thread Andreas Schmitz
maybe I don't understand the problem. there is no need to clean WAL files after recovery. where exactly is the problem ? regards andreas erobles wrote: PITR recovery On 05/21/2010 03:04 PM, Andreas Schmitz wrote: erobles wrote: which is the right procedure to clean wal files after a