Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Marco Colombo
Scott Marlowe wrote: > On Fri, Mar 13, 2009 at 1:09 PM, Christophe wrote: >> So, if the software calls fsync, but fsync doesn't actually push the data to >> the controller, you are still at risk... right? > > Ding! > I've been doing some googling, now I'm not sure that not supporting barriers i

Re: [GENERAL] [Pgpool-general] panic: index siblings mismatch

2009-03-13 Thread Tatsuo Ishii
Have you turned off autovacuum on the first db node before starting online recovery? -- Tatsuo Ishii SRA OSS, Inc. Japan > Hello, > > today I recognized an error while playing with pgpool-II 2.1 and > postgresql 8.3.5 (on 64bit linux). > I really don't know if the error is caused by pgpool or if

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Scott Marlowe
On Fri, Mar 13, 2009 at 1:09 PM, Christophe wrote: > > On Mar 13, 2009, at 11:59 AM, Joshua D. Drake wrote: >> >> Wait, actually a good BBU RAID controller will disable the cache on the >> drives. So everything that is cached is already on the controller vs. >> the drives itself. >> >> Or am I mis

Re: [GENERAL] recatalog existing databases after re-build from source

2009-03-13 Thread Tom Lane
Adrian Klaver writes: > My guess is he thought he needed to re-initdb the cluster after > rebuilding the source to generate plpythonu. Robert, you don't need to > do that. At least, not as long as it's the same major PG version and you didn't change any configure options that affect data storage.

Re: [GENERAL] recatalog existing databases after re-build from source

2009-03-13 Thread Adrian Klaver
- "Joshua D. Drake" wrote: > On Fri, 2009-03-13 at 15:28 -0400, gnuo...@rcn.com wrote: > > Going through the PLPython threads on the Planet, I realied that I > needed plpython. So I rebuilt PG with python, expecting that I could > then re-catalog the databases. But, not. initdb, wants the

Re: [GENERAL] I don't want to back up index files

2009-03-13 Thread Glen Parker
Jeremy Harris wrote: Simon Riggs wrote: The idea of auto rebuilding indexes following recovery has already been proposed, so is under consideration. It hasn't been proposed in relation to the use case you mention, so that is new. If we did as you suggest then it would speed up the base backup b

Re: [GENERAL] I don't want to back up index files

2009-03-13 Thread Jeremy Harris
Simon Riggs wrote: The idea of auto rebuilding indexes following recovery has already been proposed, so is under consideration. It hasn't been proposed in relation to the use case you mention, so that is new. If we did as you suggest then it would speed up the base backup but would also add inde

Re: [GENERAL] Inserting string with a " into an array using {} syntax ... possible?

2009-03-13 Thread Tom Lane
Bill Moran writes: > In response to Alvaro Herrera : >> Actually this one is good. It gets the backslashes in the output because >> the " >> need to be escaped there too ('cause it's an array). But if you output a >> single element, they are not there: > Bizarre, but it passes my other tests a

Re: [GENERAL] recatalog existing databases after re-build from source

2009-03-13 Thread Joshua D. Drake
On Fri, 2009-03-13 at 15:28 -0400, gnuo...@rcn.com wrote: > Going through the PLPython threads on the Planet, I realied that I needed > plpython. So I rebuilt PG with python, expecting that I could then > re-catalog the databases. But, not. initdb, wants the data directory, which > is where t

[GENERAL] recatalog existing databases after re-build from source

2009-03-13 Thread gnuoytr
Going through the PLPython threads on the Planet, I realized that I needed plpython. So I rebuilt PG with python, expecting that I could then re-catalog the databases. But, not. initdb, wants the data directory, which is where the database files are, and doesn't run if it's not empty. The da

Re: [GENERAL] Inserting string with a " into an array using {} syntax ... possible?

2009-03-13 Thread Bill Moran
In response to Alvaro Herrera : > Bill Moran wrote: > > > bill=# insert into testarray (a) values (E'{"text \\"for > > you\\"","moretext"}'); > > INSERT 0 1 > > bill=# select * from testarray; > >a | id > > ---+ > > {"text \"for you

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Christophe
On Mar 13, 2009, at 11:59 AM, Joshua D. Drake wrote: Wait, actually a good BBU RAID controller will disable the cache on the drives. So everything that is cached is already on the controller vs. the drives itself. Or am I missing something? Maybe I'm missing something, but a BBU controller

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Joshua D. Drake
On Fri, 2009-03-13 at 11:41 -0700, Ben Chobot wrote: > On Fri, 13 Mar 2009, Joshua D. Drake wrote: > > >> It seems to me that all you get with a BBU-enabled card is the ability to > >> get burts of writes out of the OS faster. So you still have the problem, > >> it's just less like to be encounter

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Joshua D. Drake
On Fri, 2009-03-13 at 11:41 -0700, Ben Chobot wrote: > On Fri, 13 Mar 2009, Joshua D. Drake wrote: > Of course. But if you can't reliably flush the OS buffers (because, say, > you're using LVM so fsync() doesn't work), then you can't say what > actually has made it to the safety of the raid card

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Ben Chobot
On Fri, 13 Mar 2009, Joshua D. Drake wrote: It seems to me that all you get with a BBU-enabled card is the ability to get burts of writes out of the OS faster. So you still have the problem, it's just less like to be encountered. A BBU controller is about more than that. It is also supposed to

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Joshua D. Drake
On Fri, 2009-03-13 at 11:17 -0700, Ben Chobot wrote: > On Fri, 13 Mar 2009, Joshua D. Drake wrote: > > > On Fri, 2009-03-13 at 14:00 -0400, Tom Lane wrote: > >> Marco Colombo writes: > >>> You mean some layer (LVM) is lying about the fsync()? > >> > >> Got it in one. > >> > > > > I wouldn't think

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Ben Chobot
On Fri, 13 Mar 2009, Joshua D. Drake wrote: On Fri, 2009-03-13 at 14:00 -0400, Tom Lane wrote: Marco Colombo writes: You mean some layer (LVM) is lying about the fsync()? Got it in one. I wouldn't think this would be a problem with the proper battery backed raid controller correct? It

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Joshua D. Drake
On Fri, 2009-03-13 at 14:00 -0400, Tom Lane wrote: > Marco Colombo writes: > > You mean some layer (LVM) is lying about the fsync()? > > Got it in one. > I wouldn't think this would be a problem with the proper battery backed raid controller correct? Joshua D. Drake > r

Re: [GENERAL] text column indexing in UTF-8 database

2009-03-13 Thread Tom Lane
Jeff Davis writes: > One thing that still doesn't make sense to me is that texteq() is > bitwise-equality even in 8.3. Historical artifact ... we made the semantics change some time ago, but the ensuing change to remove ~=~ didn't happen until 8.4. > It sounds like Reece Hart can avoid the extra

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Tom Lane
Marco Colombo writes: > You mean some layer (LVM) is lying about the fsync()? Got it in one. regards, tom lane -- 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] text column indexing in UTF-8 database

2009-03-13 Thread Jeff Davis
On Fri, 2009-03-13 at 13:13 -0400, Tom Lane wrote: > There is actually some history here; the former distinction in the > equality operators arose from exactly your concern. But after we > put in the second-pass check to insist on bitwise equality, we > realized that the equality operators really

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Marco Colombo
Tom Lane wrote: > Marco Colombo writes: >> And I'm still wondering. The problem with LVM, AFAIK, is missing support >> for write barriers. Once you disable the write-back cache on the disk, >> you no longer need write barriers. So I'm missing something, what else >> does LVM do to break fsync()? >

Re: [GENERAL] text column indexing in UTF-8 database

2009-03-13 Thread Tom Lane
Jeff Davis writes: > It looks like an index using text_pattern_ops can be used for equality > (see my test case below). This is true as of 8.4; prior versions make a distinction between = and ~=~. > This works apparently because texteq() is defined as bitwise-equality. > Is that really correct?

[GENERAL] Problem with accesing Oracle from plperlu function when using remote pg client client.

2009-03-13 Thread Tomasz Olszak
Greetings to All! I've tried to find solution of my problem on other pg mailing lists but without bigger effect. I have a table A in PG. There is also table A in Oracle. I want to import specific row from oracle to pg, so i create plperlu function CREATE OR REPLACE FUNCTION import.ora_a_row(a_id n

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Tom Lane
Marco Colombo writes: > And I'm still wondering. The problem with LVM, AFAIK, is missing support > for write barriers. Once you disable the write-back cache on the disk, > you no longer need write barriers. So I'm missing something, what else > does LVM do to break fsync()? I think you're imagini

Re: [GENERAL] postmaster hangs on delete from

2009-03-13 Thread Alan Hodgson
On Friday 13 March 2009, e...@devdep.com wrote: > Hi, > > I have a serious issue with delete from. > > When I do something like: > > "delete from CALC_INVOICE_DATA where PERIOD_END>='2011-01-01'" > > the postmaster takes 100% CPU and then nothing happens. > Some possibilities: 1) If it's using 10

Re: [GENERAL] Inserting string with a " into an array using {} syntax ... possible?

2009-03-13 Thread Alvaro Herrera
Bill Moran wrote: > bill=# insert into testarray (a) values (E'{"text \\"for > you\\"","moretext"}'); > INSERT 0 1 > bill=# select * from testarray; >a | id > ---+ > {"text \"for you\"",moretext} | 3 Actually this one is good. It

Re: [GENERAL] Transactions in user defined function

2009-03-13 Thread Tino Wildenhain
Grzegorz Jaśkiewicz wrote: On Fri, Mar 13, 2009 at 12:03 PM, Jasid ZA wrote: Hi, Can we use sql transaction(BEGIN, COMMIT, REVOKE) inside a user defined function in Postgresql 8.3? looking forward to hear from you Nope. If function does something naughty - do RAISE EXCEPTION, that will brea

Re: [GENERAL] Transactions in user defined function

2009-03-13 Thread Tino Wildenhain
Jasid ZA wrote: Hi, Can we use sql transaction(BEGIN, COMMIT, REVOKE) inside a user defined function in Postgresql 8.3? Would that part of the documentation help? http://www.postgresql.org/docs/8.3/interactive/plpgsql-structure.html "Functions and trigger procedures are always executed with

Re: [GENERAL] Transactions in user defined function

2009-03-13 Thread Grzegorz Jaśkiewicz
On Fri, Mar 13, 2009 at 12:03 PM, Jasid ZA wrote: > Hi, > > Can we use sql transaction(BEGIN, COMMIT, REVOKE) inside a user defined > function in Postgresql 8.3? > > looking forward to hear from you Nope. If function does something naughty - do RAISE EXCEPTION, that will break transaction and que

Re: [GENERAL] Inserting string with a " into an array using {} syntax ... possible?

2009-03-13 Thread Bill Moran
In response to Pavel Stehule : > Hello > > try > postgres=# SELECT ARRAY['text "for you" some']; >array > --- > {"text \"for you\" some"} > (1 row) Thanks, and I'm aware of that, but it doesn't answer the original question. The code I'm writing is back-end c

[GENERAL] postmaster hangs on delete from

2009-03-13 Thread emsa
Hi, I have a serious issue with delete from. When I do something like: "delete from CALC_INVOICE_DATA where PERIOD_END>='2011-01-01'" the postmaster takes 100% CPU and then nothing happens. Doing any type of select on the same table works just fine, I have tried various forms of vacuums and r

[GENERAL] Transactions in user defined function

2009-03-13 Thread Jasid ZA
Hi, Can we use sql transaction(BEGIN, COMMIT, REVOKE) inside a user defined function in Postgresql 8.3? looking forward to hear from you Thanks -Jasid- -- With warm regards Jasid Z. A +91 9946109809

Re: Fwd: [GENERAL] Question about Privileges

2009-03-13 Thread Andreas Wenk
Jack W schrieb: On Thu, Mar 12, 2009 at 3:45 PM, John R Pierce > wrote: Jack W wrote: I also find that if I only grant privileges on database to dbuser as below, without granting privileges on Schema and table to dbuser, dbuser still

Re: [GENERAL] nulls

2009-03-13 Thread James B. Byrne
On: Thu, 12 Mar 2009 18:39:27 -0400, "A.M." wrote: > > The one problem I foresee is that changes to the commodity_tax_rates > table may not reflect in transaction dates that have passed. What > happens if a tax is retroactively ended or applied outside these > barriers? Is this tax calculation fr

Re: [GENERAL] Inserting string with a " into an array using {} syntax ... possible?

2009-03-13 Thread Pavel Stehule
Hello try postgres=# SELECT ARRAY['text "for you" some']; array --- {"text \"for you\" some"} (1 row) regards Pavel Stehule 2009/3/13 Bill Moran : > > Between google searches and my own experiments, I can't find any way to > actually make this work. > > I hav

[GENERAL] Inserting string with a " into an array using {} syntax ... possible?

2009-03-13 Thread Bill Moran
Between google searches and my own experiments, I can't find any way to actually make this work. I have a TEXT[] column, and one of the values I want to insert is 'text "for" you'. Is there no way to do this using the {} syntax? Chronicled below are several of my attempts (various noise has bee

Re: [GENERAL] I don't want to back up index files

2009-03-13 Thread Simon Riggs
On Thu, 2009-03-12 at 12:57 -0700, Glen Parker wrote: > Tom Lane wrote: > > Glen Parker writes: > >> Tom Lane wrote: > >>> ... AFAICS what > >>> Glen is proposing is to not WAL-log index changes, and with that any > >>> crash no matter how minor would have to invalidate indexes. > > > >> Nooo..

Re: [GENERAL] Maximum transaction rate

2009-03-13 Thread Marco Colombo
Scott Marlowe wrote: > On Fri, Mar 6, 2009 at 2:22 PM, Ben Chobot wrote: >> On Fri, 6 Mar 2009, Greg Smith wrote: >> >>> On Fri, 6 Mar 2009, Tom Lane wrote: >>> Otherwise you need to reconfigure your drive to not cache writes. I forget the incantation for that but it's in the PG list a