Re: psycopg2 and java gssapi questions

2017-12-20 Thread Achilleas Mantzios
On 20/12/2017 21:42, Mike Feld wrote: Is this the only alternative to secure authentication since Postgres does not support secure ldap (ldaps)? Have you checked out : |ldaptls||| parameter ? https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-LDAP -- Achilleas Mantzios IT DEV L

Re: What does tcop stand for?

2017-12-20 Thread Daniel Westermann
currently browsing the source code in src/include/tcop. What does tcop stand for? Can not find any hints in the files. >> >>>Traffic cop. >> >> Thanks >> cop mean? >A cop means a policeman. Probably the name came from that it is >responsible for the traffic control between fronte

Re: What does tcop stand for?

2017-12-20 Thread Tatsuo Ishii
>>> currently browsing the source code in src/include/tcop. What does tcop >>> stand for? Can not find any hints in the files. > >>Traffic cop. > > Thanks > cop mean? A cop means a policeman. Probably the name came from that it is responsible for the traffic control between frontend and bac

Re: What does tcop stand for?

2017-12-20 Thread Daniel Westermann
>> Hi, >> >> currently browsing the source code in src/include/tcop. What does tcop stand >> for? Can not find any hints in the files. >Traffic cop. Thanks cop mean?

Re: What does tcop stand for?

2017-12-20 Thread Tatsuo Ishii
> Hi, > > currently browsing the source code in src/include/tcop. What does tcop stand > for? Can not find any hints in the files. Traffic cop. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp

What does tcop stand for?

2017-12-20 Thread Daniel Westermann
Hi, currently browsing the source code in src/include/tcop. What does tcop stand for? Can not find any hints in the files. Thanks Daniel

Re: problems with postgresql 10.1 hba_conf on fedora 27

2017-12-20 Thread support-tiger
On 12/20/2017 06:33 PM, David G. Johnston wrote: On Wednesday, December 20, 2017, rob stone > wrote: > local    all   all       postgres                peer > > host    all    all 127.0.0.1/32  md5 > > host    all    all 

Re: problems with postgresql 10.1 hba_conf on fedora 27

2017-12-20 Thread David G. Johnston
On Wednesday, December 20, 2017, rob stone wrote: > > > localall all postgrespeer > > > > hostallall 127.0.0.1/32 md5 > > > > hostallall ::1/128 md5 > > > > now gives error on restart and we cannot find the log file

Re:Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread mark
Hi Tomas,Uwe,David G Thanks for your reply. >So, did a single process use 70% of memory, or all postgres processes >combined? all postgres processes use over 70% of memory. >If just a single process, it might be a poor plan choice (e.g. hash >aggregate may easily cause that). because delet

Re: problems with postgresql 10.1 hba_conf on fedora 27

2017-12-20 Thread rob stone
On Wed, 2017-12-20 at 16:05 -0700, support-tiger wrote: > can someone please help ? > > postgresql-10 > > fedora 27 > > our hba_conf that worked with pg 9x > > localall all postgrespeer > > hostallall 127.0.0.1/32 md5 > > hostallall

Re: problems with postgresql 10.1 hba_conf on fedora 27

2017-12-20 Thread James Keener
> postgres remains so damn difficult and time wasting to quickly get up and running  vs other db's and docs don't help much See, I feel exactly the opposite. The docs are some of the best of any database or open source software I've used. Postgres also does the "right" thing almost all the time

Re: problems with postgresql 10.1 hba_conf on fedora 27

2017-12-20 Thread David G. Johnston
On Wed, Dec 20, 2017 at 4:05 PM, support-tiger wrote: > can someone please help ? > > postgresql-10 > > fedora 27 > ​Installed via yum? ​ > our hba_conf that worked with pg 9x > ​There are six of them, which one specifically? now gives error on restart and we cannot find the log fil > ​e >

problems with postgresql 10.1 hba_conf on fedora 27

2017-12-20 Thread support-tiger
can someone please help ? postgresql-10 fedora 27 our hba_conf that worked with pg 9x local    all   all   postgres    peer host    all    all   127.0.0.1/32 md5 host    all    all   ::1/128  md5 now gives error on restart and we cannot find t

Re: psycopg2 and java gssapi questions

2017-12-20 Thread Mike Feld
This shows you how to setup GSSAPI authentication server side, which I have already done and have working. My question is from client side, without a human logged in to generate the ticket. >>Hello, >>have a look at >>https://www.postgresql.org/docs/current/static/auth-methods.html >>There ar

Re: psycopg2 and java gssapi questions

2017-12-20 Thread basti
Hello, have a look at https://www.postgresql.org/docs/current/static/auth-methods.html There are details about LDAP and GSSAPI. On 20.12.2017 20:42, Mike Feld wrote: > Is it possible to authenticate with Postgres from a standalone > application using gssapi? In other words, I am able to authenti

psycopg2 and java gssapi questions

2017-12-20 Thread Mike Feld
Is it possible to authenticate with Postgres from astandalone application using gssapi? In other words, I am able to authenticatewith Postgres when a human has logged in to either Windows or Linux andgenerated a ticket, but is it possible for say a Django site or Javaapplication running on some

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Andreas Kretschmer
Am 20.12.2017 um 17:24 schrieb Tomas Vondra: That means if you have all 50 connections active, they may easily consume 100% of memory, because 50 * 2 is 100. It's even easier if the connections are executing complex queries, because each query may use multiple work_mem buffers. So 2% seems a bi

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Scott Marlowe
On Wed, Dec 20, 2017 at 9:25 AM, Andreas Kretschmer wrote: > > > Am 20.12.2017 um 16:08 schrieb mark: >> >> postgresql process used over 70% of memory and occuered OOM. >> what should I do to deal with this problem? > > > https://www.postgresql.org/docs/current/static/kernel-resources.html > 18.4.

Caching of sproc

2017-12-20 Thread Rakesh Kumar
I want to confirm my understanding. When a stored procedure is called the first time the code's compiled version is cached and used next time it is executed. However it is cached once for every session and not globally for all sessions. In other words, if we have a large number of concurrent s

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Uwe
On Wednesday, December 20, 2017 9:59:24 AM PST David G. Johnston wrote: > On Wed, Dec 20, 2017 at 9:44 AM, Uwe wrote: > > IIRC work_mem is a PER CONNECTION setting, > > ​The docs for this setting clearly state that a single connection/session > can itself use multiple times this values for a sing

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread David G. Johnston
On Wed, Dec 20, 2017 at 9:44 AM, Uwe wrote: > IIRC work_mem is a PER CONNECTION setting, > ​The docs for this setting clearly state that a single connection/session can itself use multiple times this values for a single query. https://www.postgresql.org/docs/10/static/runtime-config-resource.htm

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Uwe
On Wednesday, December 20, 2017 11:08:51 PM PST mark wrote: > I have set shared_buffers is 1/4 of memory. > work_mem is 2% of memory. > max_connections is 50. > momery size is 16GB. > postgresql process used over 70% of memory and occuered OOM. > what should I do to deal with this problem? IIRC wo

RE: Re: Re: PostgreSQL needs percentage function

2017-12-20 Thread Nick Dro
 I said: "Percentage calculation exists in almost any databse and information system" I didn't say it exists in any RDB. I meant that any system that is using databse like information system uses percentace calculation therefor if most of the users of the databse need such function it make sence

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Andreas Kretschmer
Am 20.12.2017 um 16:08 schrieb mark: postgresql process used over 70% of memory and occuered OOM. what should I do to deal with this problem? https://www.postgresql.org/docs/current/static/kernel-resources.html 18.4.4. Linux Memory Overcommit Regards, Andreas -- 2ndQuadrant - The PostgreSQL

Re: postgresql 9.5 has ocuuered OOM

2017-12-20 Thread Tomas Vondra
On 12/20/2017 04:08 PM, mark wrote: > I have set shared_buffers is 1/4 of memory. > work_mem is 2% of memory. > max_connections is 50. That means if you have all 50 connections active, they may easily consume 100% of memory, because 50 * 2 is 100. It's even easier if the connections are executing

postgresql 9.5 has ocuuered OOM

2017-12-20 Thread mark
I have set shared_buffers is 1/4 of memory. work_mem is 2% of memory. max_connections is 50. momery size is 16GB. postgresql process used over 70% of memory and occuered OOM. what should I do to deal with this problem?

Re: Re: PostgreSQL needs percentage function

2017-12-20 Thread Chris Travers
If you want one: create or replace percent(numeric, numeric) returns numeric language sql as $$ select ($1 / 100) * $2; $$; On Tue, Dec 19, 2017 at 4:51 PM, Melvin Davidson wrote: > > > On Tue, Dec 19, 2017 at 4:54 AM, Pavel Stehule > wrote: > >> >> >> 2017-12-19 10:13 GMT+01:00 Nick Dro : >>

Re: Debugging a function - what's the best way to do this quickly?

2017-12-20 Thread Merlin Moncure
On Tue, Dec 19, 2017 at 1:24 PM, Kevin Burke wrote: > I'm writing a function that looks a little like this: > > DROP FUNCTION IF EXISTS myfunction; > CREATE OR REPLACE FUNCTION myfunction(arg1 uuid, > _symbol text, > _start timestamp with time zone, > _end timestamp with time zone > )

Re: Enforcing users to write schemas when creating tables

2017-12-20 Thread Laurenz Albe
Gabriel Furstenheim Milerud wrote: > I'm trying to enforce db users to write a schema when creating a table. That > is: > > create table some_schema.my_table (a int); -- should succeed > create my_table (a int); -- should fail > > I don't know if that is possible. > > What I've tried

Enforcing users to write schemas when creating tables

2017-12-20 Thread Gabriel Furstenheim Milerud
Hi, I'm trying to enforce db users to write a schema when creating a table. That is: create table some_schema.my_table (a int); -- should succeed create my_table (a int); -- should fail I don't know if that is possible. What I've tried so far is to create a schema which is first in th