Re: [GENERAL] Optimize query for listing un-read messages

2014-05-03 Thread Alban Hertroys
On 01 May 2014, at 13:06, Andreas Joseph Krogh andr...@visena.com wrote: I have the following query to list all un-read messages for person with id=1: SELECT m.id AS message_id, prop.person_id, coalesce(prop.is_read, FALSE) AS is_read, m.subject

Re: [GENERAL] Optimize query for listing un-read messages

2014-05-03 Thread Andreas Joseph Krogh
På lørdag 03. mai 2014 kl. 11:51:08, skrev Alban Hertroys haram...@gmail.com mailto:haram...@gmail.com: On 01 May 2014, at 13:06, Andreas Joseph Krogh andr...@visena.com wrote: I have the following query to list all un-read messages for person with id=1:   SELECT      m.id               

Re: [GENERAL] Optimize query for listing un-read messages

2014-05-03 Thread Alban Hertroys
On 03 May 2014, at 12:45, Andreas Joseph Krogh andr...@visena.com wrote: Do you really need to query message_property twice? I would think this would give the same results: SELECT m.id AS message_id, prop.person_id, coalesce(prop.is_read, FALSE) AS

Re: [GENERAL] Optimize query for listing un-read messages

2014-05-03 Thread Andreas Joseph Krogh
På lørdag 03. mai 2014 kl. 23:21:21, skrev Alban Hertroys haram...@gmail.com mailto:haram...@gmail.com: On 03 May 2014, at 12:45, Andreas Joseph Krogh andr...@visena.com wrote: Do you really need to query message_property twice? I would think this would give the same results: SELECT    

Re: [GENERAL] Server continuously enters to recovery mode.

2014-05-03 Thread David G Johnston
DrakoRod wrote Hi everybody! I have a problem (really huge problem), I have one server of production, but yesterday in the night I saw this error: * ERROR: could not access status of transaction 2410303155 DETAIL: Could not open file pg_clog/08FA: No such file or directory *

Re: [GENERAL] Manipulating jsonb

2014-05-03 Thread Andreas Heiduk
Hello Oleg, how are the odds that the '||' and '-' operators from jsonbx will be included in the public 9.4 release? Andreas On 2 May 2014 21:21, Oleg Bartunov obartu...@gmail.com wrote: Andreas, take a look on https://github.com/erthalion/jsonbx. This is a place, where all hstore

[GENERAL] Normalization in text search ranking

2014-05-03 Thread Tim van der Linden
Hi all Another question regarding full text, this time about ranking. The ts_ranking() and ts_ranking_cd() accept a normalization integer/bit mask. In the documentation the different integers are somewhat laid out and it is said that some take into account the document length (1 and 2) while

Re: [GENERAL] Manipulating jsonb

2014-05-03 Thread Andreas Heiduk
Hello Oleg, that's a pitty. I think at least some server-side processing for jsonb would make a round package. But I will monitor Dimitri's extension. Thank you very much for your answer. Andreas On 3 May 2014 00:26, Oleg Bartunov obartu...@gmail.com wrote: No way, Andreas ! But, we hope,

[GENERAL] Server continuously enters to recovery mode.

2014-05-03 Thread DrakoRod
Hi everybody! I have a problem (really huge problem), I have one server of production, but yesterday in the night I saw this error: *ERROR: could not access status of transaction 2410303155 DETAIL: Could not open file pg_clog/08FA: No such file or directory* Solution: * dd

Re: [GENERAL] Server continuously enters to recovery mode.

2014-05-03 Thread Rene Romero Benavides
Try dumping the database, you might have a damaged table as in this case: http://www.postgresql.org/message-id/cagwygjwpiffet_k6qvxjjqo_jrqiueu+bszr1hurrh1obv8...@mail.gmail.com good luck. 2014-05-03 18:59 GMT-05:00 David G Johnston david.g.johns...@gmail.com: DrakoRod wrote Hi everybody!