Re: [GENERAL] Sort Method: external merge

2011-08-25 Thread Ondrej Ivanič
Hi, On 26 August 2011 00:14, Tom Lane wrote: > =?UTF-8?Q?Ondrej_Ivani=C4=8D?= writes: >> work_mem is set to 4 000 000 kb and I do not understand why few >> queries (3 and 5) used disk and the rest fit were able to data into >> memory. > > The on-disk representation of sort data is quite a bit mo

Re: [GENERAL] passing cursors from one PL function to another

2011-08-25 Thread Merlin Moncure
2011/8/25 Martín Marqués : > CREATE OR REPLACE FUNCTION prueba_cursor(codigo integer, curCursor refcursor) >   RETURNS SETOF refcursor AS > $BODY$ > DECLARE >       cur alias for $2; > BEGIN >       PERFORM mpf.ConstruyeCursorDesdeQuery('cur' ,'SELECT * from > tab1 WHERE field < 11000'); > END; > $

Re: [GENERAL] pg_restore with -j fails (works without -j option)

2011-08-25 Thread Tom Lane
Lonni J Friedman writes: > [ this doesn't work: ] > $ cat 2011-08-25-1314280801-nightly.out | pg_restore -j2 -U lfriedman -v -d > nightly It's basically impossible for that to work. -j implies spawning multiple processes that will be wanting to read concurrently from different places in the inp

Re: [GENERAL] passing cursors from one PL function to another

2011-08-25 Thread Martín Marqués
Sorry, pressed send. :-( I have, as the functions show below, 2 functions that call one another, passing a cursor (AFAIK). The problem is that it doesn't work, giving errors when executing the last SELECT. Is it posible to pass a cursor from one function to another? El día 25 de agosto de 2011 2

[GENERAL] passing cursors from one PL function to another

2011-08-25 Thread Martín Marqués
CREATE OR REPLACE FUNCTION prueba_cursor(codigo integer, curCursor refcursor) RETURNS SETOF refcursor AS $BODY$ DECLARE cur alias for $2; BEGIN PERFORM mpf.ConstruyeCursorDesdeQuery('cur' ,'SELECT * from tab1 WHERE field < 11000'); END; $BODY$ LANGUAGE 'plpgsql' VOLATILE COST 100 R

[GENERAL] pg_upgrade problem

2011-08-25 Thread hubert depesz lubaczewski
hi I have 8.3.11 database, ~ 600GB in size. I want to upgrade it to 9.0. First, I tried with 9.0.4, and when I hit problem (the same) I tried git, head of 9.0 branch. So. I did pg_upgrade with -c, and it looked like this: $ time pg_upgrade -c -v -b /opt/pgsql-8.3.11-int/bin/ -B /opt/pgsql-9.0

[GENERAL] pg_restore with -j fails (works without -j option)

2011-08-25 Thread Lonni J Friedman
Greetings, I've got a postgresql-9.0.4 cluster running on a Linux-x86_64 system. I'm going to need to do some maintanence next week which will require dumping & reloading the database on a different physical system. Since I'm interested in minimizing downtime, I figured I'd use pg_restore's "-j" op

Re: [GENERAL] access to lexems or access to parsed elements

2011-08-25 Thread Ivan Sergio Borgonovo
On Thu, 25 Aug 2011 18:21:21 +0200 "Massa, Harald Armin" wrote: > I want to access the single words in a text. Better yet: the > relevant words (i.e. without stop words) in a text. > > to_tsvector or casting gets me the lexems as a tsvector: I wrote this piece of C code more than a year ago. [1

Re: [GENERAL] rollback doubt and connection to remoteDB

2011-08-25 Thread Scott Marlowe
On Thu, Aug 25, 2011 at 9:35 AM, uanacho wrote: > hi, some days ago I have a problem I want to solve. > > The situation is the following: > > I have a connection to a remote DB (with it's different from mine, of > course). > The querys I do are between sql-transactions Wait, are you running your

Re: [GENERAL] access to lexems or access to parsed elements

2011-08-25 Thread Sushant Sinha
Can this fit? select plainto_tsquery('english', 'the quick brown fox jumped over the lazy fox'); plainto_tsquery - 'quick' & 'brown' & 'fox' & 'jump' & 'lazi' & 'fox' -Sushant. On Thu, 2011-08-25 at 18:21

[GENERAL] access to lexems or access to parsed elements

2011-08-25 Thread Massa, Harald Armin
I want to access the single words in a text. Better yet: the relevant words (i.e. without stop words) in a text. to_tsvector or casting gets me the lexems as a tsvector: select to_tsvector('the quick brown fox jumped over the lazy fox') ''brown':3 'fox':4,9 'jump':5 'lazi':8 'quick':2' And I wou

[GENERAL] rollback doubt and connection to remoteDB

2011-08-25 Thread uanacho
hi, some days ago I have a problem I want to solve. The situation is the following: I have a connection to a remote DB (with it's different from mine, of course). The querys I do are between sql-transactions 1 - Whate happens If during executing a query my pc loose the network connection? what h

Re: [GENERAL] Sort Method: external merge

2011-08-25 Thread Tom Lane
=?UTF-8?Q?Ondrej_Ivani=C4=8D?= writes: > work_mem is set to 4 000 000 kb and I do not understand why few > queries (3 and 5) used disk and the rest fit were able to data into > memory. The on-disk representation of sort data is quite a bit more compact than the in-memory representation. So where

Re: [GENERAL] Streaming Replication: Observations, Questions and Comments

2011-08-25 Thread Samba
The problem with maintaining a separate archive is that one need to write some additional scripts to periodically remove older log files from the archive and that gets complicated with a setup having one master and multiple slaves. I think it is a better idea to club compression and clean up in th

Re: [GENERAL] documentation for hashtext?

2011-08-25 Thread Massa, Harald Armin
> > hashtext > I believe it's considered an internal function, and not one to rely > on. If you search the archives, you will find reports around a version > upgrade when it changed the output for a certain input and thus broke > yes. I did find that discussion, and a blog post by Peter E. abou

Re: [GENERAL] documentation for hashtext?

2011-08-25 Thread Magnus Hagander
On Thu, Aug 25, 2011 at 13:20, Massa, Harald Armin wrote: > hello, > just tried to lookup the documentation of hashtext. > And I did not find it by: > a) searching the online docs with the integrated searchengine > b) reading through the chapter 9 "functions and operators" >    -> within string fu

[GENERAL] documentation for hashtext?

2011-08-25 Thread Massa, Harald Armin
hello, just tried to lookup the documentation of hashtext. And I did not find it by: a) searching the online docs with the integrated searchengine b) reading through the chapter 9 "functions and operators" -> within string functions, there is md5(string), but not hashtext. c) searching post

Re: [GENERAL] SPAM Alert !

2011-08-25 Thread Greg Williamson
This is clearly spam and I would suggest that the sender be blacklisted for sending it. Sure, they might be a victim too, but one whose mail system has been compromised. > >From: Chris Barnes >To: chr...@bitheads.com; lindsay.d...@btconnect.com; s.li...@sympa

[GENERAL] Sort Method: external merge

2011-08-25 Thread Ondrej Ivanič
Hi, I have several queries in *single* transaction and I want to figure out reasonable work_mem value. Here is the excerpt from "explain plan" -- each query has two sorts: 1) Sort Method: quicksort Memory: 6 324kB Sort Method: quicksort Memory: 1 932 13