Re: [GENERAL] What's a good way to improve this query?

2013-06-07 Thread Jorge Arévalo
Hello again, El jueves 6 de junio de 2013 a las 12:23, Jorge Arévalo escribió: > Hello, > > > El miércoles 5 de junio de 2013 a las 20:31, Paul Ramsey escribió: > > > Well, your objects are larger than the page size, so you're getting them > > out of the t

Re: [GENERAL] What's a good way to improve this query?

2013-06-06 Thread Jorge Arévalo
ta call and unpacking the record at client side, it's really faster. Many thanks! And many thanks about Shark too. Looks great. Best regards, Jorge > > Paul > > -- > Paul Ramsey > http://cleverelephant.ca > http://postgis.net > > > On Wed

[GENERAL] What's a good way to improve this query?

2013-06-05 Thread Jorge Arévalo
Hello, I'm running this PostGIS Raster query select st_scalex(rast), st_scaley(rast), st_skewx(rast), st_skewy(rast), st_width(rast), st_height(rast), rid, st_upperleftx(rast), st_upperlefty(rast), st_numbands(rast) from my_postgis_raster_table I want to remark that, even when 'ra

Re: [GENERAL] Best way to reduce server rounds getting big BLOBs

2013-05-16 Thread Jorge Arévalo
11:31 AM, Jorge Arévalo > mailto:jorgearev...@libregis.org)> wrote: > > Hello, > > > > I'd like to know what's the best way to reduce the number of server rounds > > in a libpq C app that fetches BLOBs from a remote PostgreSQL server. > > > &

[GENERAL] Best way to reduce server rounds getting big BLOBs

2013-05-15 Thread Jorge Arévalo
Hello, I'd like to know what's the best way to reduce the number of server rounds in a libpq C app that fetches BLOBs from a remote PostgreSQL server. About 75% of the time my app uses is spent querying database. I basically get binary objects (images). I have to fetch all the images from a ta

[GENERAL] Best way to reduce server rounds getting big BLOBs

2013-05-15 Thread Jorge Arévalo
Hello, I'd like to know what's the best way to reduce the number of server rounds in a libpq C app that fetches BLOBs from a remote PostgreSQL server. About 75% of the time my app uses is spent querying database. I basically get binary objects (images). I have to fetch all the images from a tab

Re: [GENERAL] Should I free this memory?

2011-04-23 Thread Jorge Arévalo
hat's the difference between tuple-cycle and query-cycle lifespan? In case of functions returning several rows (SRF), I see it clear. But in case of functions returning single values, or single rows, I can't see it. >                        regards, tom lane > Many thanks for your response, a

[GENERAL] Should I free this memory?

2011-04-22 Thread Jorge Arévalo
but I'm not sure why. So, maybe my real doubt is: which memory context are fcinfo->flinfo->fn_mcxt and old_context? In which context should I work and why? Many thanks in advance, and best regards -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com

Re: [GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Jorge Arévalo
x27;s not enough memory, chooses one of the processes and kills it. > PostgreSQL is a victim in this case. > > Tomas > > Ok, I got it. Anyway, my question again: could I expect some help from postgres backend to avoid this situation? Something like "I don't want to be killed by the

Re: [GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Jorge Arévalo
configuration? > > Try "\set FETCH_COUNT 1000" or so. > >                        regards, tom lane > Thanks for the tip. Best regards, -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://m

[GENERAL] Join query including two generate_series calls causes big memory growth and crash

2011-04-20 Thread Jorge Arévalo
ly get x and y: SELECT x, y FROM generate_series(1, 10) x, generate_series(1, 10) y, my_table Is it normal? I mean, postgres has to deal with millions of rows, ok, but shouldn't it start swapping memory instead of crashing? Is a question of postgres configuration? Thanks in advance, -- Jo

Re: [GENERAL] Memory management in Postgres

2011-04-13 Thread Jorge Arévalo
2011/4/13 Simon Riggs : > 2011/4/13 Jorge Arévalo : >> >> I'm very interested in PostgreSQL memory management, specially in the >> concept "memory context". I've read the official documentation at >> http://www.postgresql.org/docs/8.4/static/spi-memo

Re: [GENERAL] Memory leak in SPI_finish call

2011-04-13 Thread Jorge Arévalo
2011/4/5 Jorge Arévalo : > Hello, > > I'm having problems with a PostgreSQL server side C-function. It's not > an aggregate function (operates over a only row of data). When the > function is called over tables with ~4000 rows, it causes postgres > backend crash with S

[GENERAL] Memory management in Postgres

2011-04-13 Thread Jorge Arévalo
icular book or url? Many thanks in advance, -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g -- Sent via pgsql-genera

[GENERAL] Memory leak in SPI_finish call

2011-04-05 Thread Jorge Arévalo
d with postgres database, I get "Program received signal SIGQUIT, Quit. 0x00651422 in __kernel_vsyscall ()". No more information. No core dumped. So, what can I do to find the error, apart from that things? Any clue with the information posted above? Thanks in advance, -- Jorge

Re: [GENERAL] In what cases can SPI_finish crash postgres backend?

2011-03-23 Thread Jorge Arévalo
e > Hello Pavel, I'm using a precompiled version of PostgreSQL. I guess I can compile it myself. Thanks for the advice. -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http:/

[GENERAL] In what cases can SPI_finish crash postgres backend?

2011-03-23 Thread Jorge Arévalo
gsql-general@postgresql.org/msg79320.html Thanks in advance, -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g -- Sent

[GENERAL] How to improve this query?

2011-02-07 Thread Jorge Arévalo
ndex Cond: (TABLE_A.wkb_geometry && TABLE_C.the_geom)" " -> Hash (cost=2.88..2.88 rows=88 width=63)" "-> Seq Scan on TABLE_B (cost=0.00..2.88 rows=88 width=63)" With that information, how could I make the update faster? It takes more than 24hours to

Re: [GENERAL] Executing SQL expression from C-functions

2011-01-28 Thread Jorge Arévalo
2011/1/28 Pavel Stehule : > Hello > > see SPI interface > > http://www.postgresql.org/docs/8.4/interactive/spi-examples.html > > Regards > > Pavel Stehule > Hi Pavel, Thanks a lot! Best regards, -- Jorge Arévalo Internet & Mobilty Division, DEIMOS j

[GENERAL] Executing SQL expression from C-functions

2011-01-28 Thread Jorge Arévalo
nction? Many thanks in advance, and best regards -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
one ASAP (my boss is not here right now, and I need credentials). Still crashing, so, I'm going to continue working on it. Many thanks! -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://mobility.grupodeimos.com/ http://gis4free.wordpress.com -- Sent

Re: [GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
query (select table_names from other_table), and the fields names from a XML file. Can the query which fetch the table names cause a memory problem? Seems weird -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://mobility.grupodeimos.com/ http://gis4fre

Re: [GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
2010/11/17 Jorge Arévalo : > On Wed, Nov 17, 2010 at 12:14 AM, Tom Lane wrote: >> =?ISO-8859-1?Q?Jorge_Ar=E9valo?= writes: >>> On Tue, Nov 16, 2010 at 11:46 PM, Tom Lane wrote: >>>> Can you boil it down to a self-contained test case? >> >>> Before

Re: [GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
> is fine as long as you still get the error. > > BTW, PG 8.4.which? > >                        regards, tom lane > Still getting the same error. I'm going to simply execute the query in the client. I'd like to provide you an SQL script. Let me ask about privacy (doesn&

Re: [GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
vm.overcommit_memory=2 to sysctl.conf, and execute sysctl -p. If crashes again, I'll isolate the query Thanks again -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://mobility.grupodeimos.com/ http://gis4free.wordpress.com -- Sent via pgsql-

Re: [GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
2010/11/16 Andy Colson : > On 11/16/2010 3:55 PM, Jorge Arévalo wrote: >> >> Hello, >> >> I'm getting an error message in my Python script: >> >> pg.ProgrammingError: ERROR:  out of memory >> DETAIL:  Failed on request of size 16. >> >>

[GENERAL] Programming error: Out of Memory

2010-11-16 Thread Jorge Arévalo
work_mem to 32MB, effective_cache_size to 128MB. Didn't work. I think it's a problem with data, because I've tested this other times with other data at worked. What could be happening? Many thanks in advance -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.ar