Re: [GENERAL] Query runs slow

2013-11-24 Thread Hengky Liwandouw
Dear Kevin, After reading the link you gave to me, changing shared_buffers to 25% (512MB) of available RAM and effective_cache_size to 1500MB (about 75% of available RAM) make the query runs very fast. Postgres only need 1.8 second to display the result. Thanks a lot ! On Nov 24, 2013, at 11:

Re: [GENERAL] [ADMIN] GSSAPI authentication with AD

2013-11-24 Thread Stephen Frost
Abbas, * Abbas (abbas@gmail.com) wrote: > created enterprisedb user in AD with DES encryption type. Do not use DES- it's not secure and there's no reason to use it. Use AES instead. > -bash-4.1$ klist > > Ticket cache: FILE:/tmp/krb5cc_501 > > Default principal: POSTGRES/cen...@my.testdom

[GENERAL] GSSAPI authentication with AD

2013-11-24 Thread Abbas
Hi, I am struggling to provide access to the windows Active Directory user into postgres database. Am using windows server 2008R2, created forest in AD with 2003 compatibility. postgresql 9.3.1 has been compiled with gssapi and krb5 support on centos both windows server and contos are on vms with

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > Is it possible to execute the code just like this? > I like to do that for Debugging. > I can't execute the .so files, of course and If I just do "gcc filename", I > have the issue with the includes. No, if it's a backend extension there's no way to execute it standa

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
Now it's working. My Makefile: OBJS = test.o MODULES = test DATA = test.c PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) Is it possible to execute the code just like this? I like to do that for Debugging. I can't execute the .so files, of course and If I just do "gcc

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
I wrote: > "Janek Sendrowski" writes: >> Makefile: >> PROGRAM = test >> DATA = test.c > It looks like the problem is that there aren't any Postgres-specific -I > flags in the make command. After a bit of poking around in the pgxs code > I think the reason why not is that you're using the PROGRA

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > The file test.c just inlcudes: #include "postgres.h". > root@ubuntu:/usr/include/postgresql/9.3/server# gcc test.c > In file included from postgres.h:48:0, >                  from test.c:1: > utils/elog.h:69:28: fatal error: utils/errcodes.h: No such fi

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
The file test.c just inlcudes: #include "postgres.h". root@ubuntu:/usr/include/postgresql/9.3/server# gcc test.c In file included from postgres.h:48:0, from test.c:1: utils/elog.h:69:28: fatal error: utils/errcodes.h: No such file or directory compilation terminated. If elog.h fi

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > Now the link editor is working, but I still have one problem. > The files in /utils for example include there files with #include > "utils/filename" and it doesn't work, because the file which includes them is > already in the directory /utils. Could we see the exac

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
Hi, Thanks for your answer. Now the link editor is working, but I still have one problem. The files in /utils for example include there files with #include "utils/filename" and it doesn't work, because the file which includes them is already in the directory /utils. It's the same with all direct

Re: [GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Tom Lane
"Janek Sendrowski" writes: > The file test.c only includes the postgres.h (#include > "postgres.h"), but I get this error, when compiling: > /usr/bin/ld: cannot find -lxslt > /usr/bin/ld: cannot find -lxml2 > /usr/bin/ld: cannot find -lpam > /usr/bin/ld: cannot find -ledit > collect2: ld returne

[GENERAL] /usr/bin/ld: cannot find [...] when compiling

2013-11-24 Thread Janek Sendrowski
Hi,   My Makefile looks like this: PROGRAM = test DATA = ""> PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS)   The file test.c only includes the postgres.h (#include "postgres.h"), but I get this error, when compiling: /usr/bin/ld: cannot find -lxslt /usr/bin/ld

Re: [GENERAL] Query runs slow

2013-11-24 Thread Kevin Grittner
Hengky Lie wrote: > this query takes long time to process. It takes around 48 seconds > to calculate about 690 thousand record. > Is there any way to make calculation faster ? Quite possibly -- that's about 70 microseconds per row, and even fairly complex queries can often do better than that. 

[GENERAL] Query runs slow

2013-11-24 Thread Hengky Lie
Hi all, I have query like this : select subkategori,produkid, namabarang , sum(keluar) as ttlkeluar, sum(ttlmodal) as ttlmodal from ( select subkategori, kodebarang as produkid, namabarang, keluar, tbltransaksi.modal*keluar as ttlmodal, case when tbltransaksi.discount<=100 then keluar*(harga

Re: [GENERAL] 9.1.9 -> 9.1.10 causing corruption

2013-11-24 Thread Ben Chobot
For posterity, it appears my issues were https://wiki.postgresql.org/wiki/Nov2013ReplicationIssue. On Nov 4, 2013, at 3:48 PM, Ben Chobot wrote: > Anybody? I've tried this again on another streaming replication server, and > again had pg_toast errors until I re-basebackup'd it. Does it make se

Re: [GENERAL] ERROR: out of memory DETAIL: Failed on request of size ???

2013-11-24 Thread Christofer C. Bell
On Fri, Nov 22, 2013 at 1:09 PM, Edson Richter wrote: > Em 19/11/2013 02:30, Brian Wong escreveu: > > I've tried any work_mem value from 1gb all the way up to 40gb, with no > effect on the error. I'd like to think of this problem as a server process > memory (not the server's buffers) or client

Re: [GENERAL] Getting non_NULL right-side values on a non-matching join?

2013-11-24 Thread Ken Tanzer
On Sat, Nov 23, 2013 at 9:21 AM, Tom Lane wrote: > Ken Tanzer writes: > > On Sat, Nov 23, 2013 at 2:20 AM, Vik Fearing > wrote: > >> Chapter 15 of our documentation handles installing from source. > >> http://www.postgresql.org/docs/current/static/installation.html > > > Thanks for the link. I