[GENERAL] plql and or clausule

2016-05-31 Thread carlos
hello this is my first question. I am new in postgres and using plsql. i am making this (bellow) i want to insert one copy of one record into the log table but if there is some change into the original recor to update into this record two fields but i have one rror can you help me please?

Re: [GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread Juan Carlos Michaca Lucero
n Tue, Apr 12, 2016 at 9:22 AM, Juan Carlos Michaca Lucero wrote: I want to recover the dead data. El Martes, 12 de abril, 2016 11:16:15, David G. Johnston escribió: On Tue, Apr 12, 2016 at 9:11 AM, Juan Carlos Michaca Lucero wrote: Hi PostgreSQL, I'musing PostgreSQL 9.3 running

[GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread Juan Carlos Michaca Lucero
Hi PostgreSQL,  I'musing PostgreSQL 9.3 running on Ubuntu Server.   Ihave a complex function to populate a big table, in order to improve performance;data is prepared in temporary tables before it will be inserted. I called thisfunction many times from my application, but something goes wrong

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
Ok. I understand, to put there a pull request, I must to register into this webpage ?? -Mensaje original- De: Vladimir Sitnikov [mailto:sitnikov.vladi...@gmail.com] Enviado el: lunes, 14 de diciembre de 2015 10:53 a.m. Para: Corradini, Carlos CC: Kevin Grittner; Adrian Klaver; List

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
I forgot one more thing ... The return I made in the stored function is : RETURNS RECORD AS ' Excuse me for the forget ... -Mensaje original- De: Kevin Grittner [mailto:kgri...@gmail.com] Enviado el: viernes, 11 de diciembre de 2015 06:54 p.m. Para: Corradini, Carlos CC: A

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
e been the most clear as my poor level of English could be Many thanks for all and specially to the postgresql community list !! -Mensaje original- De: Kevin Grittner [mailto:kgri...@gmail.com] Enviado el: viernes, 11 de diciembre de 2015 06:54 p.m. Para: Corradini, Carlos CC: Adria

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
w_bsc.proc_perspectives(character varying, integer, character varying, character varying, character varying, integer, date) TO usr_dw_bsc_sys_adm; GRANT EXECUTE ON FUNCTION dw_bsc.proc_perspectives(character varying, integer, character varying, character varying, character varying, integer,

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-14 Thread Corradini, Carlos
diciembre de 2015 12:27 p.m. Para: Corradini, Carlos; pgsql-j...@postgresql.org; pgsql-general@postgresql.org CC: bo...@ejurka.com Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA On 12/11/2015 07:10 AM, Corradini, Carlos wrote: > Mr. Adrian, first let me say m

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Corradini, Carlos
a.m. Para: Corradini, Carlos; pgsql-j...@postgresql.org; pgsql-general@postgresql.org CC: bo...@ejurka.com Asunto: Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA On 12/11/2015 04:56 AM, Corradini, Carlos wrote: > Mr. Adrian, here i transcribe the code of the function

Re: [GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-11 Thread Corradini, Carlos
; select * from dw_bsc.proc_perspectives('R', 1, null, null, null, null, null); fetch all from ""; end; inside the query gui tool provided by pgAdmin III The connection into the java application was changed to con.setAutoCommit(false); I think I do not forget nothing else Some h

[GENERAL] [JDBC] plpgsql function with RETURNS SETOF refcursor in JAVA

2015-12-10 Thread Corradini, Carlos
Dear Gurus : First let me say hello from Buenos Aires, Argentina. I took this emails addresses from internet ( page www.postgresql.org ) Now I will try to explain which is my problem ( excuse my poor level of English, please ). I have a Java application that

[GENERAL] Has anyone used C-JDBC, HA-JDBC or SymmetricDB with PostgreSQL?

2015-04-11 Thread Edson Carlos Ericksson Richter
Hi, Could anyone share experiences on using C-JDBC, HA-JDBC or SymmetricDB to create a PostgreSQL cluster environment on distributed (different geo locations)? Thanks, Edson -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://

Re: [GENERAL] Replication: How to query current segments allocation relative to "Wal keep segments"?

2015-01-05 Thread Edson Carlos Ericksson Richter
On 05-01-2015 02:08, Michael Paquier wrote: On Sun, Jan 4, 2015 at 1:48 AM, Edson Carlos Ericksson Richter wrote: How to query current segments allocation relative to "Wal keep segments" in each master server? What is your server version? You can have a look at pg_stat_replicat

[GENERAL] Replication: How to query current segments allocation relative to "Wal keep segments"?

2015-01-03 Thread Edson Carlos Ericksson Richter
I'm maintaining async replication (streaming) between four database servers arranged on 2 x 2. How to query current segments allocation relative to "Wal keep segments" in each master server? I want to add this query to Postbix in order to monitor if the "wal keep segments" parameter is too shor

Re: [GENERAL] pg_base_backup limit bandwidth possible?

2015-01-03 Thread Edson Carlos Ericksson Richter
At the end, I've chosen to use the following: trickle -u 500 -d 500 rsync --progress --partial -az ${PGDATA}/* r...@xxx.bb.com:/var/lib/pgsql/repl-9.3/data/ --exclude postmaster.pid --exclude postgresql.conf --exclude pg_hba.conf --exclude pg_log and it worked really well. This way I've

[GENERAL] pg_base_backup limit bandwidth possible?

2014-12-29 Thread Edson Carlos Ericksson Richter
Hi! I could not find in docs, is there any way to limit pg_base_backup bandwidth usage? Thanks, Edson -- 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] How to install pgAdmin 1.20 on Mint Rebecca?

2014-12-26 Thread Edson Carlos Ericksson Richter
On 26-12-2014 22:13, Adrian Klaver wrote: On 12/26/2014 02:16 PM, Edson Carlos Ericksson Richter wrote: Yes, building from sources worked flawlessly, even for me (I'm not kind a "build C apps from sources" guy). Great that it worked for you. I have had issues with the wx

Re: [GENERAL] How to install pgAdmin 1.20 on Mint Rebecca?

2014-12-26 Thread Edson Carlos Ericksson Richter
Yes, building from sources worked flawlessly, even for me (I'm not kind a "build C apps from sources" guy). Regards, Edson On 26-12-2014 17:15, Adrian Klaver wrote: On 12/26/2014 10:41 AM, Edson Carlos Ericksson Richter wrote: Can someone point simple instructions on how to

[GENERAL] How to install pgAdmin 1.20 on Mint Rebecca?

2014-12-26 Thread Edson Carlos Ericksson Richter
Can someone point simple instructions on how to install pgAdmin 1.20 on Linux Mint Rebecca (17.1 - based on Ubuntu trusty)? Thanks, Edson Richter -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsq

[GENERAL] Database and OS monitoring

2014-12-13 Thread Edson Carlos Ericksson Richter
Dear list, I've been searching in web for guidelines on OS (Linux) and PostgreSQL (9.3.5) active monitoring best practices. Can someone share experiences? I'm inclined to look at Cacti and Nagios. Any other experiences? Recommended books? I don't want to use SaaS for monitoring - I'll have a c

Re: [GENERAL] Out of memory condition

2014-12-11 Thread Carlos Henrique Reimer
bytes Max nice priority 00 Max realtime priority 00 Max realtime timeout unlimitedunlimited us [root@2-NfseNet-SGDB ~]# On Thu, Dec 11, 2014 at 6:01 PM, Tom Lane wrote: > Carlos Henrique Reimer writes: > > Yes,

Re: [GENERAL] Out of memory condition

2014-12-11 Thread Carlos Henrique Reimer
014 at 12:05 PM, Carlos Henrique Reimer > wrote: > > That was exactly what the process was doing and the out of memory error > > happened while one of the merges to set 1 was being executed. > > You sure you don't have a ulimit getting in the way? > -- Reim

Re: [GENERAL] Out of memory condition

2014-12-11 Thread Carlos Henrique Reimer
That was exactly what the process was doing and the out of memory error happened while one of the merges to set 1 was being executed. On Thu, Dec 11, 2014 at 4:42 PM, Vick Khera wrote: > > On Thu, Dec 11, 2014 at 10:30 AM, Tom Lane wrote: > >> needed to hold relcache entries for all 23000 table

Re: [GENERAL] Out of memory condition

2014-12-11 Thread Carlos Henrique Reimer
Slony version is 2.2.3 On Thu, Dec 11, 2014 at 3:29 PM, Scott Marlowe wrote: > Just wondering what slony version you're using? > -- Reimer 47-3347-1724 47-9183-0547 msn: carlos.rei...@opendb.com.br

Re: [GENERAL] Out of memory condition

2014-12-11 Thread Carlos Henrique Reimer
(-x) unlimited On Thu, Dec 11, 2014 at 1:30 PM, Tom Lane wrote: > Carlos Henrique Reimer writes: > > I've facing an out of memory condition after running SLONY several hours > to > > get a 1TB database with about 23,000 tables replicated. The error oc

[GENERAL] Out of memory condition

2014-12-11 Thread Carlos Henrique Reimer
GCC gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4) (1 row) Thank you! Carlos Reimer

Re: [GENERAL] execute trigger after another one

2014-12-04 Thread Carlos Carcamo
2014-12-04 17:31 GMT-06:00 Adrian Klaver : > On 12/04/2014 03:11 PM, Carlos Carcamo wrote: >> >> 2014-12-04 16:46 GMT-06:00 David G Johnston : >>> >>> Carlos Carcamo wrote >>>> >>>> I read about oGlenrder of execution of triggers, is supp

Re: [GENERAL] execute trigger after another one

2014-12-04 Thread Carlos Carcamo
2014-12-04 16:46 GMT-06:00 David G Johnston : > Carlos Carcamo wrote >> I read about order of execution of triggers, is supposed that postgres >> executes triggers in alphabetical order, so I called the plpgsql >> a_trigger and the second one b_trigger (as an example), but

[GENERAL] execute trigger after another one

2014-12-04 Thread Carlos Carcamo
Hello list, hope you're well. I need some help with postgres. I have two triggers that are executed after insert, update and delete. One trigger is with plpgsql language and the other one is with pl/python, the first one just update some tables and last one calls a *.sh that is executed to perfor

[GENERAL] pg_dump: [archiver] -C and -c are incompatible options

2014-09-23 Thread Carlos Carcamo
Hello list, I need some help with this error: ... pg_dump: saving encoding = UTF8 pg_dump: saving standard_conforming_strings = on pg_dump: [archiver] -C and -c are incompatible options pg_dump: *** aborted because of error Process returned exit code 1. I get this error when i'm trying to create

Re: [GENERAL] Why isn't Java support part of Postgresql core?

2014-09-18 Thread Edson Carlos Ericksson Richter
On 18-09-2014 17:58, cowwoc wrote: On 18/09/2014 4:26 PM, David G Johnston [via PostgreSQL] wrote: ​ "only PostgreSQL uses it" ... PostgreSQL doesn't use Java. I don't think it makes a difference from a licensing point of view. The point is that the JRE is not used to run multiple distinct

[GENERAL] After upgrade from 9.2.9 to 9.3.5 got reduced contention

2014-09-13 Thread Edson Carlos Ericksson Richter
After a week or so since upgrade from 9.2.9 to 9.3.5 I'm very surprised (in a good way) by the gain of performance. Most noticeable change is the reduced contention for records by exclusive/shared locks. I can see increased numbers of requests fulfilled per minute (but I can't be exact on th

Re: [GENERAL] Any experiences running PostgreSQL 9.3.5 on compressed Btrfs on Linux?

2014-09-13 Thread Edson Carlos Ericksson Richter
- Hash: SHA1 On 09/13/2014 08:24 AM, Edson Carlos Ericksson Richter wrote: Any experiences running PostgreSQL 9.3.5 on compressed Btrfs on Linux? Yes. It ran great for over a month but once we had some serious data in it (multiple terrabytes) it died, more than once, and the last time was

[GENERAL] Any experiences running PostgreSQL 9.3.5 on compressed Btrfs on Linux?

2014-09-13 Thread Edson Carlos Ericksson Richter
Any experiences running PostgreSQL 9.3.5 on compressed Btrfs on Linux? Thanks, Edson -- 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] help with a procedure

2014-06-05 Thread Carlos Carcamo
Just a little, I will read it again, thanks for your help. 2014-06-05 10:39 GMT-06:00 David G Johnston : > > Have you read this chapter of the documentation? > > http://www.postgresql.org/docs/9.3/interactive/plpgsql.html > > > Carlos Carcamo wrote > > What I

Re: [GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
-06-05 10:14 GMT-06:00 Seref Arikan : > Sorry, I meant: "calling a stored procedure you'll write in postgres from > php" > > > On Thu, Jun 5, 2014 at 5:13 PM, Seref Arikan > wrote: > >> Hi Carlos, >> When you say procedures, do you mean calling

Re: [GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
2014-06-05 9:32 GMT-06:00 Carlos Carcamo : > Hi everyone, I wonder if you could help me with a procedure that I would > like to perform in postgresql. > > I have an insert query like this: > > INSERT INTO products (product_id, description, price, qty, ...) values > (&#

[GENERAL] help with a procedure

2014-06-05 Thread Carlos Carcamo
Hi everyone, I wonder if you could help me with a procedure that I would like to perform in postgresql. I have an insert query like this: INSERT INTO products (product_id, description, price, qty, ...) values ('01', 'some description', 10.15, 5, ...) then if there is no problem, perform another

[GENERAL] Disk Encryption in Production

2014-03-25 Thread Carlos Espejo
Anybody running their PostgreSQL server from a ecryptfs container? What are the common production setups out there? What are the drawbacks that people have experienced with their solution? -- Carlos Espejo

[GENERAL] Re: [GENERAL] Help on ṕerformance

2013-10-02 Thread Carlos Eduardo Sotelo Pinto
2013/10/2 Merlin Moncure > On Mon, Sep 30, 2013 at 10:03 AM, Carlos Eduardo Sotelo Pinto > wrote: > > > > I need a help on postgresql performance > > > > I have configurate my postgresql files for tunning my server, however it > is > > slow and cpu resources

Re: [GENERAL] OLAP

2013-08-27 Thread Carlos Saritama
Checkout the Saiku, the future of Open Source Interactive OLAP( http://analytical-labs.com ) On Tue, Aug 27, 2013 at 8:34 PM, Carlos Saritama wrote: > according to what you write pentaho best fits your needs > > > On Tue, Aug 27, 2013 at 5:52 PM, Pavel Stehule wrote: > >>

Re: [GENERAL] OLAP

2013-08-27 Thread Carlos Saritama
according to what you write pentaho best fits your needs On Tue, Aug 27, 2013 at 5:52 PM, Pavel Stehule wrote: > > Dne 28. 8. 2013 0:05 "Jerry Sievers" napsal(a): > > > > > Alban Hertroys writes: > > > > > On Aug 27, 2013, at 19:07, Paul Jungwirth > wrote: > > > > > >> Hi Alban, > > >> > > >>

Re: [GENERAL] Exit code -1073741819

2013-08-07 Thread Carlos Henrique Reimer
follow to identify the root cause in order to prevent it to happen again? Thank you! On Tue, Aug 6, 2013 at 9:14 PM, Sergey Konoplev wrote: > On Tue, Aug 6, 2013 at 4:17 PM, Carlos Henrique Reimer > wrote: > > I have tried to drop the index and the reindex procedure but both fail &g

Re: [GENERAL] Exit code -1073741819

2013-08-06 Thread Carlos Henrique Reimer
directory to the new box. Hope the error will not be propagated to the new box. Reimer On Mon, Aug 5, 2013 at 10:42 AM, Adrian Klaver wrote: > On 08/05/2013 06:24 AM, Carlos Henrique Reimer wrote: > >> Hi, >> >> Yes, I agree with you that it must be upgraded to a support

Re: [GENERAL] Exit code -1073741819

2013-08-05 Thread Carlos Henrique Reimer
, 2013 at 8:35 AM, Craig Ringer wrote: > On 08/04/2013 02:41 AM, Carlos Henrique Reimer wrote: > > Hi, > > > > I have a Windows box running Windows Server 2003 Enterprise Edition > > Service Pack 2 with PostgreSQL 8.2.23 and getting a server crash while > > trying

[GENERAL] Exit code -1073741819

2013-08-03 Thread Carlos Henrique Reimer
Hi, I have a Windows box running Windows Server 2003 Enterprise Edition Service Pack 2 with PostgreSQL 8.2.23 and getting a server crash while trying to select a table: select * from "TOTALL.tt_est" where assina=' kdkd' ; Dumping the table with pg_dump or creating indexes in this table produce t

Re: [GENERAL] How to implement a value alias or synonym

2013-07-10 Thread Carlos Oliva
Also this: http://www.postgresql.org/docs/9.2/static/textsearch-configuration.html From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Wednesday, July 10, 2013 3:49 PM To: pgsql-general@postgresql.org Subject: [GENERAL] How to

Re: [GENERAL] How to implement a value alias or synonym

2013-07-10 Thread Carlos Oliva
http://www.postgresql.org/message-id/440d446e.7040...@cybertec.at From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Gauthier, Dave Sent: Wednesday, July 10, 2013 3:49 PM To: pgsql-general@postgresql.org Subject: [GENERAL] How to implement a value

Re: [GENERAL]

2013-05-15 Thread Carlos Henrique Reimer
as source_t > , pg_type as target_t > ,pg_proc as proc > WHERE > ct.castsource = source_t.oid > and ct.casttarget = target_t.oid > and ct.castfunc = proc.oid > > I get 144 rows. > http://www.rummandba.com/2013/02/postgresql-type-casting-information.html > > &g

Re: [GENERAL]

2013-05-15 Thread Carlos Henrique Reimer
It works if I drop the functions but then the select trim(1) does not work; On Wed, May 15, 2013 at 5:38 PM, AI Rumman wrote: > Drop those functions and try again. > > > On Wed, May 15, 2013 at 4:22 PM, Carlos Henrique Reimer < > carlos.rei...@opendb.com.br> wrote: &g

Re: [GENERAL]

2013-05-15 Thread Carlos Henrique Reimer
issed that. > Which version of 9.2 you are working with? I am also at 9.2 and its > working fine. > Try out using > select 'teste'||1::int; > > See if it works or not. > > > On Wed, May 15, 2013 at 3:41 PM, Carlos Henrique Reimer < > carlos.rei...@opendb.co

Re: [GENERAL]

2013-05-15 Thread Carlos Henrique Reimer
1-to.html > > It'll work. > > > On Wed, May 15, 2013 at 3:17 PM, Carlos Henrique Reimer < > carlos.rei...@opendb.com.br> wrote: > >> Hi, >> >> Currently, our application is still using PG 8.2 and we are trying to use >> 9.2 but there are some

[GENERAL]

2013-05-15 Thread Carlos Henrique Reimer
Hi, Currently, our application is still using PG 8.2 and we are trying to use 9.2 but there are some problems related with the implicit casts removed on 8.3. Example: 1) select 'teste'||1; 2) select trim(1); Select 1 & 2 does run fine on 8.2 but in 9.2 select 1 is ok and select 2 got an error d

[GENERAL] PG in cash till machines

2013-05-10 Thread Carlos Henrique Reimer
Hi, We are developing a solution which will run in thousands of small cash till machines running Linux and we would like to use PostgreSQL but there is a insecurity feeling regarding the solution basically because these boxes would be exposed to an insecure environment and insecure procedures like

[GENERAL] Inherit Superuser Role Help

2013-04-17 Thread Carlos Mennens
What am I missing here? postgres=> SELECT current_user; current_user -- carlos (1 row) postgres=> CREATE DATABASE carlosdb; ERROR: permission denied to create database postgres=> \du List of roles

Re: [GENERAL] Role Authentication Failure

2013-04-15 Thread Carlos Mennens
I dropped both roles (Carlos & DBA) from the database and I will show you exactly what I'm doing: postgres=# \du List of roles Role name | Attributes |

Re: [GENERAL] Role Authentication Failure

2013-04-15 Thread Carlos Mennens
I'm doing this all in psql. Example: CREATE ROLE carlos LOGIN CREATEDB CREATE ROLE REPLICATION; Then set password \password carlos Now I create the ROLE: CREATE ROLE dba NOLOGIN; So now I have two roles: -carlos = user role -dba = group role I can login just fine as 'carlos&#x

[GENERAL] Role Authentication Failure

2013-04-15 Thread Carlos Mennens
I can't understand what is going on with my PostgreSQL server. For some reason after I GRANT my role 'carlos' to the 'dba' group role, I lose the ability to login. I've reset the password over and over for 'carlos' and even reversing the grant doesn'

Re: [GENERAL] PostgreSQL Backup Booklet

2013-04-03 Thread Carlos Mennens
___** > > See > http://www.peak6.com/email_**disclaimer/<http://www.peak6.com/email_disclaimer/>for > terms and conditions related to this email > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general> > -- Carlos Mennens

[GENERAL] Can't Drop Role

2013-03-08 Thread Carlos Mennens
ction pg_file_rename(text,text) owner of function pg_file_rename(text,text,text) owner of function pg_file_write(text,text,boolean) owner of extension adminpack -- Carlos Mennens -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:

Re: [GENERAL] Runtime variations during day

2013-02-13 Thread Carlos Henrique Reimer
Sorry for the confusion, the plans from morning and evening are really different for sure. Let me ensure with my team that postgresql configuration is not changed between morning and evening and will recollect the data tomorrow. On Wed, Feb 13, 2013 at 8:34 PM, Kevin Grittner wrote: > Car

Re: [GENERAL] Runtime variations during day

2013-02-13 Thread Carlos Henrique Reimer
ample that could help is this seqscan: explain analyze select sittrib8 from iparq.arript where sittrib8=33; In the evening: Fri Feb 8 14:00:01 BRST 2013 QUERY PLAN ---

[GENERAL] Runtime variations during day

2013-02-13 Thread Carlos Henrique Reimer
Hi, I`m trying to figure out why a query runs in 755ms in the morning and 20054ms (26x) in the evening. _ Mornin

Re: [GENERAL] Differences when calling query inside and outside cursor

2013-02-13 Thread Carlos Henrique Reimer
= 2::smallint) AND ((tipopgto)::text > ' '::text)) OR ((ano = 2013::smallint) AND (mes = 1::smallint) AND (codfunc = 29602::bigint) AND (seqfunc = 2::smallint) AND ((tipopgto)::text = ' '::text) AND (codpd > 0::smallint))) (2 rows) Should it not be the same inside o

[GENERAL] Differences when calling query inside and outside cursor

2013-02-13 Thread Carlos Henrique Reimer
Hi, We're facing a weird performance problem in one of our PostgreSQL servers running 8.0.26. What can explain the difference between calling same query inside and outside a cursor? If we run the query outside a cursor we got a response time of 755ms and 33454ms if we call the same query inside a

Re: [GENERAL] Sample databases

2013-01-16 Thread Carlos Mennens
onal values. Sadly unless you create one yourself, I don't think there's one publicly available that meets our expectations. -- Carlos Mennens -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Dedicated PostgreSQL System

2013-01-02 Thread Carlos Mennens
be dedicated to running Linux and PostgreSQL software. Can someone please help me understand a few things I need to view or test with in order to get the most utilization from PostgreSQL & the dedicated hardware it will sit on top? -- Carlos Mennens -- Sent via pgsql-general mailing list (pgs

Re: [GENERAL] Running out of memory while making a join

2012-11-14 Thread Carlos Henrique Reimer
eimer On Tue, Nov 13, 2012 at 5:51 PM, Tom Lane wrote: > Carlos Henrique Reimer writes: > > That is what I got from gdb: > > > ExecutorState: 11586756656 total in 1391 blocks; 4938408 free (6 > > chunks); 11581818248 used > > So, query-lifespan memory leak.

Re: [GENERAL] Running out of memory while making a join

2012-11-12 Thread Carlos Henrique Reimer
Hi, That is what I got from gdb: TopMemoryContext: 88992 total in 10 blocks; 10336 free (7 chunks); 78656 used Type information cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 used Operator lookup cache: 24576 total in 2 blocks; 11888 free (5 chunks); 12688 used Operator class

Re: [GENERAL] Running out of memory while making a join

2012-11-10 Thread Carlos Henrique Reimer
Hi, How is the best way to attach a debugger to the SELECT and identify why is it exhausting server storage. Thank you in advance! On Fri, Nov 9, 2012 at 4:10 AM, Craig Ringer wrote: > On 11/08/2012 11:35 PM, Carlos Henrique Reimer wrote: > > Hi Craig, > > > > work_mem

Re: [GENERAL] Running out of memory while making a join

2012-11-08 Thread Carlos Henrique Reimer
abled triggers: tg_nfe BEFORE INSERT OR DELETE OR UPDATE ON "5611_nfarq".nfe FOR EACH ROW EXECUTE PROCEDURE fun_nfarq.nfe('5611', 'NFARQ') FiscalWeb=# On Thu, Nov 8, 2012 at 10:50 AM, Craig Ringer wrote: > On 11/08/2012 06:20 PM, Carlos Henrique Reimer wrote: >

[GENERAL] Running out of memory while making a join

2012-11-08 Thread Carlos Henrique Reimer
Hi, The following SQL join command runs the PostgreSQL server out of memory. The server runs on a box with Red Hat Enterprise Linux Server release 6.3 (Santiago) and PostgreSQL 8.3.21. select wm_nfsp from "5611_isarq".wm_nfsp left join "5611_nfarq".nfe on wm_nfsp.tpdoc = 7 where 1 = 1 and wm_nfsp

Re: [GENERAL] Automated Backup Script Help (Linux)

2012-03-07 Thread Carlos Mennens
On Wed, Mar 7, 2012 at 2:08 PM, John R Pierce wrote: > whats that pg_backup.sh script look like?  you're getting shell errors on > line 7 and 8 of the script. I didn't attach it since it's the same as the link I referenced in my original post. I'll attach it in here for those that don't or can't

[GENERAL] Automated Backup Script Help (Linux)

2012-03-07 Thread Carlos Mennens
I'm trying to get the automated backup scripts to work from: http://wiki.postgresql.org/wiki/Automated_Backup_on_Linux Currently I'm using PostgreSQL 9.1.3 and have the following three files: carlos@db1:~/postgresql$ ls -l total 20 drwxr-xr-x 2 carlos users 4096 Mar 7 13:13 backup -r

Re: [GENERAL] Dynamic File Name for COPY TO in Stored Procedure

2012-02-23 Thread Carlos Oliva
That worked. Thank you Adrian -Original Message- From: Adrian Klaver [mailto:adrian.kla...@gmail.com] Sent: Thursday, February 23, 2012 9:58 AM To: pgsql-general@postgresql.org Cc: Carlos Oliva Subject: Re: [GENERAL] Dynamic File Name for COPY TO in Stored Procedure On Thursday

[GENERAL] COPY TO File: Using dynamic file name in stored procedure

2012-02-23 Thread Carlos Oliva
Hi, What would it be the correct format for using a variable in a stored procedure that uses COPY TO? I have the current stored procedure: CREATE FUNCTION Table_To_File(text) RETURNS void AS $delimeter$ COPY (SELECT * FROM table_to_xml('table', true, false, '')) TO '$1' WITH CSV QUOTE ' '; $de

[GENERAL] Dynamic File Name for COPY TO in Stored Procedure

2012-02-23 Thread Carlos Oliva
Hi, What would it be the correct format for using a variable in a stored procedure that uses COPY TO? I have the current stored procedure: CREATE FUNCTION Table_To_File(text) RETURNS void AS $delimeter$ COPY (SELECT * FROM table_to_xml('table', true, false, '')) TO '$1' WITH CSV QUOTE ' '; $de

[GENERAL] Defining Role Privileges

2012-02-08 Thread Carlos Mennens
I'm wondering about my CREATE ROLE statements for PostgreSQL. I guess I don't know if there's an official answer but I feel like I'm entering a lot of redundant privileges to a role for example: CREATE ROLE tom NOINHERIT LOGIN SUPERUSER CREATEDB CREATEROLE REPLICATION; CREATE ROLE My question is

Re: [GENERAL] Puzzling full database lock

2012-02-01 Thread Carlos Mennens
On Wed, Feb 1, 2012 at 7:51 PM, Christopher Opena wrote: > It's CentOS 5.5, PostgreSQL version 9.0.4 (x86_64). That seems extremely bleeding edge for CentOS. Did you compile this package from source RPM or some 3rd party package maintainer for PostgreSQL? -- Sent via pgsql-general mailing list

Re: [GENERAL] Puzzling full database lock

2012-02-01 Thread Carlos Mennens
On Wed, Feb 1, 2012 at 7:38 PM, Christopher Opena wrote: > Hello folks, > > We've been running into some very strange issues of late with our PostgreSQL > database(s).  We have an issue where a couple of queries push high CPU on a > few of our processors and the entire database locks (reads, write

[GENERAL] log_statement variable does not admit all value

2012-01-21 Thread Jose Carlos Martinez Llario
Hi List, This variable admit according to docs: mod, ddl, all values. the all value is not accepted. I have postgres 9.1. s1=# set log_statement = all; ERROR: syntax error at or near "all" LINE 1: set log_statement = all; cheers, Jose -- Sent via pgsql-general mailing list (pgsql-general@

Re: [GENERAL] Data Type for Money

2011-12-30 Thread Carlos Mennens
On Fri, Dec 30, 2011 at 12:46 PM, Adrian Klaver wrote: > My guess is it is listed as numeric which is equivalent to decimal: > > http://www.postgresql.org/docs/9.1/interactive/datatype-numeric.html Thanks. I just for some reason can't see or understand the difference between 'decimal' & 'numeric'

Re: [GENERAL] Dated Version of PostgreSQL

2011-12-30 Thread Carlos Mennens
2011/12/30 Devrim GÜNDÜZ : > Hi, > > On Fri, 2011-12-30 at 11:50 -0500, Carlos Mennens wrote: >> My question is how exactly would I >> install the latest version of PostgreSQL (9.1.2) on RHEL 6.2? > > We have PostgreSQL yum repository: > > http://yum.postgresql.org

[GENERAL] Data Type for Money

2011-12-30 Thread Carlos Mennens
I'm trying to understand what is the recommended data type for $ in PostgreSQL. I've done some research and from what I've gathered, there are a few options: 1. decimal 2. money I've read the 'money' data type is non-standard and I should avoid using this. I see it a bunch of Microsoft SQL Server

Re: [GENERAL] Dated Version of PostgreSQL

2011-12-30 Thread Carlos Mennens
h your distro might help. > However, the worst that can happen is that it stops before compiling, so no > big deal. > > Bèrto > > > On 30 December 2011 18:59, Carlos Mennens wrote: >> >> I've never compiled anything from source. Is this difficult if I've

[GENERAL] Dated Version of PostgreSQL

2011-12-30 Thread Carlos Mennens
I've been asked to stand up a dedicated database server for a new office. They're only requirement is the server run RHEL 6.2 64-bit. I told them no problem as I'm very familiar with Linux and installing / configuring PostgreSQL. So after I've installed RHEL 6.2, I then installed PostgreSQL and the

[GENERAL] How To Handle Hung Connections

2011-12-20 Thread Carlos Mennens
I'm attempting to delete a database that I've obviously not closed connections from cleanly. postgres=# DROP DATABASE filters; ERROR: database "filters" is being accessed by other users DETAIL: There are 4 other session(s) using the database. How exactly would one manage this issue from a Postg

[GENERAL] Streaming Replication Configuration

2011-12-15 Thread Carlos Mennens
LECT pg_start_backup('label', true)" $ rsync -a ${PGDATA}/ standby:/srv/pgsql/standby/ --exclude postmaster.pid $ psql -c "SELECT pg_stop_backup()" When I attempt the 1st command listed on my primary (master) server, I get this error: carlos@db1:~$ psql -c "SELECT pg_s

Re: [GENERAL] Server/Data Migration Advice

2011-12-15 Thread Carlos Mennens
On Thu, Dec 15, 2011 at 11:09 AM, Raymond O'Donnell wrote: > The point here is that with the plain-text dump (the default output from > pg_dump), you can feed that directly to psql; but you have no control > over what is restored, or in what order, without editing the dump file > directly. > > If,

Re: [GENERAL] Server/Data Migration Advice

2011-12-15 Thread Carlos Mennens
On Thu, Dec 15, 2011 at 10:28 AM, Adrian Klaver wrote: > The reason I pointed to the manual links is that there is a lot of good > information in there. It deserves more than a skim:). Realistically, to get > the > most out of the dump/restore process you need to know the options available on > b

Re: [GENERAL] Server/Data Migration Advice

2011-12-15 Thread Carlos Mennens
On Thu, Dec 15, 2011 at 9:37 AM, Adrian Klaver wrote: > You know the fine manual covers this?: > http://www.postgresql.org/docs/9.1/interactive/app-pgdump.html I've honestly skimmed the manual and it's very easy to use and good but it covers so many aspects and sometimes I need a specific answer

Re: [GENERAL] Server/Data Migration Advice

2011-12-15 Thread Carlos Mennens
On Mon, Dec 12, 2011 at 12:23 PM, Andreas Kretschmer wrote: > - use the pg_dumpall from the new version to make the dump, for instance >  pg_dumpall -h ... | psql (something like this, on the new >  host) I performed a pg_dump from my new 9.1.2 server but my question now is importing the data. S

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
I run the command in my shell (not in Cron), I'm prompted for my login password. Should I change the permissions in pg_hba.conf and enable INHERIT grants on my user? Should I place this in who's Cron line? Postgres? Carlos? or Root? > > Watch the path's, who know's w

Re: [GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
On Wed, Dec 14, 2011 at 1:15 PM, Andy Colson wrote: > Yep, you simply cron a pg_dump.  (dumpall if you want users/roles and all > databases).  No locking needed. So how would one put this in cron if I wanted to run this everyday? 0 * * * * /usr/bin/pg_dumpall > pg_dumpall.$DATE.sql Will that wo

[GENERAL] Locking Tables & Backup Inquiry

2011-12-14 Thread Carlos Mennens
I'm wanted to find out why is it recommended or even an option to lock tables during a backup of a database? I've never experimented with database backups so I'm only guessing it locks / freezes the data so no changes can be made while the backup is in process, correct? Just curious and wasn't abl

Re: [GENERAL] Server/Data Migration Advice

2011-12-12 Thread Carlos Mennens
On Mon, Dec 12, 2011 at 12:23 PM, Andreas Kretschmer wrote: > - you should use 9.1.2, not 9.1.1 ;-) I don't think it's available yet in Debian repositories. I can only use whatever packages they've compiled in their repositories. > - use the pg_dumpall from the new version to make the dump, for

[GENERAL] Server/Data Migration Advice

2011-12-12 Thread Carlos Mennens
I've finally received my new virtual database server (Debian Linux) & this weekend I'll be rolling my new PostgreSQL server online. My question is I've never migrated production data from 8.4.8 to 9.1.1. I would like to find out from the community what exactly is the recommended process in moving m

[GENERAL] CPU move

2011-11-26 Thread Carlos Henrique Reimer
Hi, We're planning to move our postgreSQL database from one CPU box to another box. I'm considering an alternative procedure for the move as the standard one (pg_dump from the old, copy dump to the new box, psql to restore in the new) will take about 10 hours to complete. The ideia is installing

[GENERAL] Create Tables As Specific Role

2011-11-09 Thread Carlos Mennens
I'm installing a calendar application called MRBS. The installation instructions require I create a role and database specifically for this web application. I'm currenlt logged in as my user account 'carlos' which is a superuser. postgres=# SELECT current

Re: [GENERAL] Replication Across Two Servers?

2011-11-04 Thread Carlos Mennens
On Fri, Nov 4, 2011 at 11:56 AM, Prashant Bharucha < prashantbharu...@yahoo.ca> wrote: > Hi Carlos > > Use Slony "master to multiple slaves" replication system for PostgreSQL > <http://www.postgresql.org/> supporting cascading (*e.g.* - a node can > feed

  1   2   3   4   5   >