Re: [GENERAL] First-class Polymorphic joins?

2015-08-17 Thread Jony Cohen
Hi, You can do this today using inheritance. define a table "tagable" with person & blog as child tables. than you could run queries like: select * from tags JOIN tagable on (tag_id = tag_fk); tag_id | tag_desc | id | tag_fk | data +--+++--

Re: [GENERAL] [BDR] vs pgpool-II v3

2015-08-17 Thread Wayne E. Seguin
Thank you everyone for your replies, the thoughts and context are greatly appreciated! On Sun, Aug 16, 2015 at 9:35 PM, Craig Ringer wrote: > On 13 August 2015 at 23:52, Wayne E. Seguin > wrote: > > > The context of this is using BDR to implement a HA solution where we > have > > one node getti

Re: [GENERAL] How to EXPLAIN a trigger function

2015-08-17 Thread Zdeněk Bělehrádek
Dne Po 17. srpna 2015 13:25:25, Albe Laurenz napsal(a): > Zdenek Belehrádek wrote: > > > We > > would like to know if there is simple way to EXPLAIN the trigger function, > > so we could optimize it. > > > I believe that the auto_explain module could help you: > http://www.postgresql.org/docs/cu

Re: [GENERAL] How to EXPLAIN a trigger function

2015-08-17 Thread Zdeněk Bělehrádek
Dne Po 17. srpna 2015 13:25:25, Albe Laurenz napsal(a): > Zdenek Belehrádek wrote: > > > We > > would like to know if there is simple way to EXPLAIN the trigger function, > > so we could optimize it. > > > I believe that the auto_explain module could help you: > http://www.postgresql.org/docs/cu

Re: [GENERAL] stack depth

2015-08-17 Thread Tom Lane
Michael H writes: > I've tried the instructions at this URL: > https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/ > I either get the same errors appear when I run systemctl daemon-reload; It's unlikely that you can change the process's ulimit with just a reload.

Re: [GENERAL] stack depth

2015-08-17 Thread Michael H
Hi Tom, I've ran systemctl damon-reload; systemctl restart postgresql-9.4 and also tried rebooting. none of these options are working. Michael On 17/08/15 14:47, Tom Lane wrote: Michael H writes: I've tried the instructions at this URL: https://ma.ttias.be/increase-open-files-limit-in-mari

Re: [GENERAL] How to EXPLAIN a trigger function

2015-08-17 Thread Albe Laurenz
Zdenek Belehrádek wrote: > We > would like to know if there is simple way to EXPLAIN the trigger function, so > we could optimize it. I believe that the auto_explain module could help you: http://www.postgresql.org/docs/current/static/auto-explain.html If you turn on "auto_explain.log_nested_stat

[GENERAL] How to EXPLAIN a trigger function

2015-08-17 Thread Zdeněk Bělehrádek
As part of our monitoring system we have a process that on every incomming event inserts a row into a dummy table. This INSERT is intercepted by BEFORE INSERT trigger that checks if the event matches some existing incident, if yes, then it updates the incident data, else it creates a new inciden

Re: [GENERAL] SELECT clause without parameters

2015-08-17 Thread Albe Laurenz
pinker wrote: > I would like to ask what's the reason of change SELECT behaviour. > In distributions below 9.4 SELECT without any parameters caused a syntax > error and now gives empty set. Was it made for some bigger aim ? :) > > for instance 8.4: > postgres=# select version(); >

[GENERAL] SELECT clause without parameters

2015-08-17 Thread pinker
I would like to ask what's the reason of change SELECT behaviour. In distributions below 9.4 SELECT without any parameters caused a syntax error and now gives empty set. Was it made for some bigger aim ? :) for instance 8.4: postgres=# select version();

Re: [GENERAL] stack depth

2015-08-17 Thread Michael H
Just out of interest, Am I able to use more than 8MB stack depth for postgresql? it's continually warning me in /var/log/messages that I cannot exceed the maximum of 7680kB... is this a fixed maximum imposed by postgresql? or does postgresql find it's maximum from system parameters and just r

Re: [GENERAL] stack depth

2015-08-17 Thread Michael H
a little update, I've tried the instructions at this URL: https://ma.ttias.be/increase-open-files-limit-in-mariadb-on-centos-7-with-systemd/ I either get the same errors appear when I run systemctl daemon-reload; systemctl restart postgresql-9.4 Aug 17 09:08:49 db1 pg_ctl[3343]: < 2015-08-17

Re: [GENERAL] stack depth

2015-08-17 Thread Chris Mair
> I don't know if that works, but it is in line with the > "systemd broke things" idea... Rereading this, I realize this might come over as too harsh. What I meant was "the introduction of systemd broke things". So this wasn't meant as anti-systemd or anything. No flames intented ;) Bye, Chris.

Re: [GENERAL] stack depth

2015-08-17 Thread Chris Mair
>>> I've edited the /etc/security/limits.conf and added >>> * softstack 12288 >>> * hardstack 12288 >> on a CentOS 6.7 box I can confirm that adding those lines to >> /etc/security/limits.conf DOES increase the limit to 12288 >> (after a reboot). >> >> I don

Re: [GENERAL] stack depth

2015-08-17 Thread Michael H
Hi Chris, On 14/08/15 17:19, Chris Mair wrote: Hi All, I'm tuning up my database and need to increase the max_stack_depth parameter in postgresql.conf. I've edited the /etc/security/limits.conf and added * softstack 12288 * hardstack 12288 but I noticed