Re: [GENERAL] Question about synchronous replication

2014-05-13 Thread Borodin Vladimir
12 мая 2014 г., в 22:26, Adrian Klaver написал(а): > On 05/12/2014 09:42 AM, Borodin Vladimir wrote: >> Hi all. >> >> Right now synchronous replication in postgresql chooses one replica as >> synchronous and waits for replies from it (with synchronous_commit = on >> | remote_write) until this r

Re: [GENERAL] Log Data Analytics : Confused about the choice of Database

2014-05-13 Thread Dorian Hoxha
Why not store session as integer? And timestamp as timesamp(z?) ? If you know the types of events, also store them as integer , and save a map of them in the app or on another table ? And save the parameters as a json column, so you have more data-types? Hstore only has strings. Be carefull wit

[GENERAL] Natural key woe

2014-05-13 Thread Oliver Kohll - Mailing Lists
I'm sure no one else on this list has done anything like this, but here's a cautionary tale. I wanted to synchronise data in two tables (issue lists) - i.e. whenever a record is added into one, add a similar record into the other. The two tables are similar in format but not exactly the same so

Re: [GENERAL] Natural key woe

2014-05-13 Thread Robin
Oliver I've read your email, with interest. I haven't had to deal with this sort of problem in PostgreSQL, but I have frequently dealt with it in a Sybase environment, first encountered about 25 years ago. I am most curious to know why you didn't use the same sequence for both tables, I must

Re: [GENERAL] Natural key woe

2014-05-13 Thread Eelke Klein
> >> One other wrinkle to note. After clearing out these rows, running 'VACUUM >> table2', 'ANALYZE table2' and 'REINDEX table table2', some queries with >> simple sequence scans were taking a few seconds to run even though there >> are only a thousand rows in the table. I finally found that runnin

Re: [GENERAL] Question about synchronous replication

2014-05-13 Thread Adrian Klaver
On 05/13/2014 12:08 AM, Borodin Vladimir wrote: 12 мая 2014 г., в 22:26, Adrian Klaver mailto:adrian.kla...@aklaver.com>> написал(а): On 05/12/2014 09:42 AM, Borodin Vladimir wrote: Hi all. Right now synchronous replication in postgresql chooses one replica as synchronous and waits for repli

[GENERAL] Log Data Analytics : Confused about the choice of Database

2014-05-13 Thread Peeyush Agarwal
Hi, I have log data of the following format: SessionTimestampEventParameters1 1 Started Session 1 2Logged In Username:"user1"2 3Started Session1 3 Started Challengetitle:"Challenge 1

[GENERAL] better performance on poorer machine?

2014-05-13 Thread Vegard Bønes
Hi, I have a database on a test server with queries that perform terribly. Trying to fix this problem, I copied the database (using pg_dump) to my laptop, and reran tests there. The same queries perform perfectly on my laptop. I have tried to use the same postgresql.conf, and run ANALYZE and ev

Re: [GENERAL] Natural key woe

2014-05-13 Thread Yeb Havinga
On 13/05/14 11:44, Oliver Kohll - Mailing Lists wrote: The problem came when someone entered a record with no subject, but left it null. When this was copied over and present in both tables, the *next* time the join was done, a duplicate was created because the join didn't see them as matching

Re: [GENERAL] better performance on poorer machine?

2014-05-13 Thread Rob Sargent
On 05/13/2014 08:48 AM, Vegard Bønes wrote: Hi, I have a database on a test server with queries that perform terribly. Trying to fix this problem, I copied the database (using pg_dump) to my laptop, and reran tests there. The same queries perform perfectly on my laptop. I have tried to use th

[GENERAL] Full-Text Search question

2014-05-13 Thread Jesus Rafael Sanchez Medrano
can postgres do FTS (full text search) on a json column? if possible, please be so kindd to give some snippet/example. Att. == Jesus Rafael Sanchez Medrano "Life is a dream, of which all must wake up"

Re: [GENERAL] better performance on poorer machine?

2014-05-13 Thread Alban Hertroys
On 13 May 2014 16:48, Vegard Bønes wrote: > I have a database on a test server with queries that perform terribly. Trying > to fix this problem, I copied the database (using pg_dump) to my laptop, and > reran tests there. The same queries perform perfectly on my laptop. We can but guess, but...

Re: [GENERAL] better performance on poorer machine?

2014-05-13 Thread Tom Lane
Alban Hertroys writes: > On 13 May 2014 16:48, Vegard Bønes wrote: >> I have a database on a test server with queries that perform terribly. >> Trying to fix this problem, I copied the database (using pg_dump) to my >> laptop, and reran tests there. The same queries perform perfectly on my >>

[GENERAL] logging hook

2014-05-13 Thread Alan Nilsson
All Is there a hook that someone could direct me to that I can use to redirect logging output? I.e. I would like to write a small module that pre loads and substitutes the loggers file descriptor with my own to redirect that output. Possible? thanks alan -- Sent via pgsql-general mailin

Re: [GENERAL] Full-Text Search question

2014-05-13 Thread Oleg Bartunov
Easy, you need to extract text fields from json and construct tsvector from them (use concatenation, for example). On Tue, May 13, 2014 at 7:38 PM, Jesus Rafael Sanchez Medrano wrote: > can postgres do FTS (full text search) on a json column? if possible, please > be so kindd to give some snippet

Re: [GENERAL] logging hook

2014-05-13 Thread Susan Cassidy
You can log to syslog, and use the syslog definitions file (syslog.conf) to pipe the output to a program that can do whatever you want with it. Susan On Tue, May 13, 2014 at 2:29 PM, Alan Nilsson wrote: > All > > Is there a hook that someone could direct me to that I can use to redirect > logg

Re: [GENERAL] logging hook

2014-05-13 Thread Alan Nilsson
Ah yes once again if I’ld just RTFM….. Thanks for pointing that out, I think I can work with that. alan On May 13, 2014, at 2:59 PM, Susan Cassidy wrote: > You can log to syslog, and use the syslog definitions file (syslog.conf) to > pipe the output to a program that can do whatever you want

Re: [GENERAL] Full-Text Search question

2014-05-13 Thread Jesus Rafael Sanchez Medrano
thanks... could you please be so kind to post some snippet/code for this? Att. == Jesus Rafael Sanchez Medrano "Life is a dream, of which all must wake up" On Tue, May 13, 2014 at 5:33 PM, Oleg Bartunov wrote: > Easy, you need to extract text fields from json and construct tsvector > from them

Re: [GENERAL] Log Data Analytics : Confused about the choice of Database

2014-05-13 Thread Peeyush Agarwal
Hi, Thanks for the reply :) Yes, Storing timestamp as timestamp [ (p) ] would be better. I simplified the session in question. It may contain alphabets as well. So, I will probably need to store it as a string only. The problem with types of events is that it is not fixed and will keep increasin

[GENERAL] LDAP authentication not working

2014-05-13 Thread Jürgen Fuchsberger
Hi, I'm running postgresql 9.1 on Debian and am trying to set up LDAP authentication using the following configuration in pg_hba.conf: hostssl testdb all 143.50.203.0/24 ldap ldapserver="wegc24.uni-graz.at" ldapport=636 ldapbinddn="cn=nss,dc=uni-graz,dc=at" ldapbindpasswd="" ldapbasedn="dc=u

Re: [GENERAL] LDAP authentication not working

2014-05-13 Thread Stephan Fabel
I don't think SSL support for LDAP is supported. Have you tried TLS on port 389? On May 13, 2014 8:20 PM, "Jürgen Fuchsberger" < juergen.fuchsber...@uni-graz.at> wrote: > Hi, > > I'm running postgresql 9.1 on Debian and am trying to set up LDAP > authentication using the following configuration in