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 differen

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 wrote: > Glyn Astill > writes: > > The schema is fairly large, but I will try. > > My guess is that you can reproduce it with not a lot of > data, if you can > isolate the trig

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 wrote: > >> Glyn Astill >> writes: >>> The schema is fairly large, but I will try. >> >> My guess is that you can reproduc

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 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 > wrote: > > > >> Glyn Astill > >> writes: > >>> The schema is fair

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 > 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 data. This i

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 fil

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

Re: [GENERAL] postgres startup failure

2010-05-21 Thread Tom Lane
Matt Bartolome writes: > On Thu, May 20, 2010 at 3:36 PM, Tom Lane 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 postmaster >> log? > Gosh, you k

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

2010-05-21 Thread Dino Vliet
From: "Thomas Kellerer" To: "" Dino 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: > > resnr,dep,arr,cls,dbd meaning reservationsnumber, d

[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 (pr

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

2010-05-21 Thread Tom Lane
Francisco Reyes 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 subscription: http://www

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"   IN

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 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 >> wrote: >> > If the hacker gets root access so they can read >> > the raw database files, they most likely also >> > have acc

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

2010-05-21 Thread Tom Lane
erobles writes: > [ 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: > psql:lostriggers:10: NOTICE: ignoring incomplete trigger group for > const

[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

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Merlin Moncure
On Fri, May 21, 2010 at 1:27 PM, Gauthier, Dave 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 stops processing af

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Tom Lane
"Gauthier, Dave" 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 error.

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

2010-05-21 Thread Francisco Reyes
Tom Lane writes: Francisco Reyes 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 to your subscription:

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

2010-05-21 Thread Tom Lane
Francisco Reyes writes: > Tom Lane writes: >> Francisco Reyes 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 in basically zero time then. You

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 [mailto:t...@sss

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 HKLM\SOFTWARE\PostgreSQL\Installatio

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Richard Broersma
On Fri, May 21, 2010 at 11:46 AM, Gauthier, Dave 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 been collected? If

Re: [GENERAL] getting all constraint violations

2010-05-21 Thread Tom Lane
"Gauthier, Dave" 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 something like

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 subscri

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