Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread John R Pierce
On 3/22/2016 2:20 PM, CS DBA wrote: I would think the ORM (as yet undefined) would want to think in terms of the parent table and not know about the physical schema details. Can the client not be written to check only for errors vs checking for non-zero inserts? That was our first suggesti

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Manuel Kniep
> So the ORM is parsing the INSERT return value, correct? > > Would something like this(borrowing from docs example) freak it out?: > > CREATE OR REPLACE FUNCTION measurement_insert_trigger() > RETURNS TRIGGER AS $$ > DECLARE >_ct int; > BEGIN >INSERT INTO measurement_y2016m03 VALUES (NEW

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Manuel Kniep
> So the ORM is parsing the INSERT return value, correct? > > Would something like this(borrowing from docs example) freak it out?: > > CREATE OR REPLACE FUNCTION measurement_insert_trigger() > RETURNS TRIGGER AS $$ > DECLARE >_ct int; > BEGIN >INSERT INTO measurement_y2016m03 VALUES (NEW

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Adrian Klaver
On 03/22/2016 02:20 PM, CS DBA wrote: On 03/22/2016 03:18 PM, Rob Sargent wrote: On 03/22/2016 03:00 PM, Joshua D. Drake wrote: On 03/22/2016 01:50 PM, CS DBA wrote: Understood, was just wondering if there is a way to cause the child table insert results to be returned to the ORM/Applicat

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Melvin Davidson
On Tue, Mar 22, 2016 at 5:20 PM, CS DBA wrote: > > > On 03/22/2016 03:18 PM, Rob Sargent wrote: > >> >> >> On 03/22/2016 03:00 PM, Joshua D. Drake wrote: >> >>> On 03/22/2016 01:50 PM, CS DBA wrote: >>> >>> Understood, was just wondering if there is a way to cause the child table insert resu

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread CS DBA
On 03/22/2016 03:18 PM, Rob Sargent wrote: On 03/22/2016 03:00 PM, Joshua D. Drake wrote: On 03/22/2016 01:50 PM, CS DBA wrote: Understood, was just wondering if there is a way to cause the child table insert results to be returned to the ORM/Application instead of the master/base table in

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Rob Sargent
On 03/22/2016 03:00 PM, Joshua D. Drake wrote: On 03/22/2016 01:50 PM, CS DBA wrote: Understood, was just wondering if there is a way to cause the child table insert results to be returned to the ORM/Application instead of the master/base table insert Insert into the child table directly ba

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Joshua D. Drake
On 03/22/2016 01:50 PM, CS DBA wrote: Understood, was just wondering if there is a way to cause the child table insert results to be returned to the ORM/Application instead of the master/base table insert Insert into the child table directly based on the partition rules. JD -- Command Promp

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread CS DBA
On 03/22/2016 02:43 PM, Joshua D. Drake wrote: On 03/22/2016 01:35 PM, CS DBA wrote: On 03/22/2016 02:23 PM, Joshua D. Drake wrote: On 03/22/2016 11:40 AM, CS DBA wrote: Hi All; we setup partitioning for a large table but had to back off because the return status (i.e: "INSERT 0 1") ret

[GENERAL] Re: Unable to make postgres + pam_ldap to work agains LDAP server using ldaps schema

2016-03-22 Thread Diogo Kiss
Anyone to help? On Tue, Mar 22, 2016, 14:06 Diogo Kiss wrote: > > Hi, > > I having trouble to configure Postgres to use PAM authentication + LDAP. > > I managed to configure successfully pam_ldap.so module to > * Authorize (account) *SSH* users from specific groups > * Authenticate (auth) and au

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Joshua D. Drake
On 03/22/2016 01:35 PM, CS DBA wrote: On 03/22/2016 02:23 PM, Joshua D. Drake wrote: On 03/22/2016 11:40 AM, CS DBA wrote: Hi All; we setup partitioning for a large table but had to back off because the return status (i.e: "INSERT 0 1") returns "INSERT 0 0" when inserting into the partitione

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread CS DBA
On 03/22/2016 02:23 PM, Joshua D. Drake wrote: On 03/22/2016 11:40 AM, CS DBA wrote: Hi All; we setup partitioning for a large table but had to back off because the return status (i.e: "INSERT 0 1") returns "INSERT 0 0" when inserting into the partitioned table which causes the ORM tool to as

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Melvin Davidson
On Tue, Mar 22, 2016 at 4:23 PM, Joshua D. Drake wrote: > On 03/22/2016 11:40 AM, CS DBA wrote: > >> Hi All; >> >> we setup partitioning for a large table but had to back off because the >> return status (i.e: "INSERT 0 1") returns "INSERT 0 0" when inserting >> into the partitioned table which c

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Joshua D. Drake
On 03/22/2016 11:40 AM, CS DBA wrote: Hi All; we setup partitioning for a large table but had to back off because the return status (i.e: "INSERT 0 1") returns "INSERT 0 0" when inserting into the partitioned table which causes the ORM tool to assume the insert inserted 0 rows. Is there a stand

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread CS DBA
On 03/22/2016 01:10 PM, Rob Sargent wrote: On 03/22/2016 12:55 PM, Melvin Davidson wrote: Your problem seems strange as it has never been previously reported for anyone else that has _successfully_ set up partioning. Perhaps is you provide just a little bit more detail we might be able to h

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Kris Deugau
Melvin Davidson wrote: > Your problem seems strange as it has never been previously reported for > anyone else that has _successfully_ set up partioning. At least as of when I asked a very similar question (http://www.postgresql.org/message-id/flat/547f7e88.7080...@vianet.ca#547f7e88.7080...@viane

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Rob Sargent
On 03/22/2016 12:55 PM, Melvin Davidson wrote: Your problem seems strange as it has never been previously reported for anyone else that has _successfully_ set up partioning. Perhaps is you provide just a little bit more detail we might be able to help you. Useful and needed information would

Re: [GENERAL] Partitioning and ORM tools

2016-03-22 Thread Melvin Davidson
Your problem seems strange as it has never been previously reported for anyone else that has _successfully_ set up partioning. Perhaps is you provide just a little bit more detail we might be able to help you. Useful and needed information would be: 1. Version of PostgreSQL 2. Operating System 3. T

[GENERAL] Partitioning and ORM tools

2016-03-22 Thread CS DBA
Hi All; we setup partitioning for a large table but had to back off because the return status (i.e: "INSERT 0 1") returns "INSERT 0 0" when inserting into the partitioned table which causes the ORM tool to assume the insert inserted 0 rows. Is there a standard / best practices work around fo

Re: [GENERAL] Equivalent of Oracle's per-session statistics (v$client_stats)?

2016-03-22 Thread Magnus Hagander
On Mar 22, 2016 6:14 PM, "Frits Jalvingh" wrote: > > Hello list, > > Oracle has a way to get per-session statistics. You identify a session using a call to dbms_session.set_identifier('xxx'), then you enable statistics using dbms_monitor.client_id_stat_enable('xxx'). > After this you do normal dat

[GENERAL] Equivalent of Oracle's per-session statistics (v$client_stats)?

2016-03-22 Thread Frits Jalvingh
Hello list, Oracle has a way to get per-session statistics. You identify a session using a call to dbms_session.set_identifier('xxx'), then you enable statistics using dbms_monitor.client_id_stat_enable('xxx'). After this you do normal database statements. Before you close the connection you can r

Re: [GENERAL] PostgreSQL advocacy

2016-03-22 Thread Bruce Momjian
On Tue, Mar 22, 2016 at 10:16:22AM -0600, Scott Marlowe wrote: > On Tue, Mar 22, 2016 at 9:15 AM, Thomas Kellerer wrote: > > Bruce Momjian schrieb am 22.03.2016 um 16:07: > >> > >> However, I do think database upgrades are easier with Oracle RAC > > > > I think you can do a rolling upgrade with a

Re: [GENERAL] pglogical two way replication problem

2016-03-22 Thread alexey.i.la...@gmail.com
Hi, Does anybody use pglogical (http://2ndquadrant.com/en/resources/pglogical/) in production or in lab? Is there any community around this project? Where can I register issue and contribute? -- Best Regards, Alexey Larin On Mon, 2016-03-21 at 11:31 +0300, alexey.i.la...@gmail.com wrote:

Re: [GENERAL] PostgreSQL advocacy

2016-03-22 Thread Scott Marlowe
On Tue, Mar 22, 2016 at 9:15 AM, Thomas Kellerer wrote: > Bruce Momjian schrieb am 22.03.2016 um 16:07: >> >> However, I do think database upgrades are easier with Oracle RAC > > I think you can do a rolling upgrade with a standby, but I'm not entirely > sure. I find Slony good for upgrading ver

Re: [GENERAL] PostgreSQL advocacy

2016-03-22 Thread Thomas Kellerer
Bruce Momjian schrieb am 22.03.2016 um 16:07: > For me, streaming replication fully solves the high reliability problem > and sharding fully solves the scaling problem. Of course, if you need > both, you have to deploy both, which gives you 100% of two solutions, > rather than Oracle RAC which giv

Re: [GENERAL] PostgreSQL advocacy

2016-03-22 Thread Bruce Momjian
On Mon, Mar 21, 2016 at 04:46:51PM +, Jernigan, Kevin wrote: > Disk is only a single point of failure in RAC if you configure > non-redundant storage. In general, Oracle recommends triple mirroring > to protect against disk failures, as they have had many experiences > over the years where cust

Re: [GENERAL] dblink_exec: can it perform a remote function?

2016-03-22 Thread Adrian Klaver
On 03/22/2016 04:39 AM, Thiemo Kellner wrote: Oh, I just noticed, I forgot to post the error message of the second try. This one, I can understand. psql:test_02.sql:21: ERROR: statement returning results not allowed CONTEXT: SQL statement "SELECT dblink_exec('pragma','select WARN(P_MESSAGE := '

[GENERAL] Fwd: Unable to make postgres + pam_ldap to work agains LDAP server using ldaps schema

2016-03-22 Thread Diogo Kiss
Hi, I having trouble to configure Postgres to use PAM authentication + LDAP. I managed to configure successfully pam_ldap.so module to * Authorize (account) *SSH* users from specific groups * Authenticate (auth) and authorize (account) users via *su* But, when I tried to use it to authenticate P

Re: [GENERAL] dblink_exec: can it perform a remote function?

2016-03-22 Thread Thiemo Kellner
Oh, I just noticed, I forgot to post the error message of the second try. This one, I can understand. psql:test_02.sql:21: ERROR: statement returning results not allowed CONTEXT: SQL statement "SELECT dblink_exec('pragma','select WARN(P_MESSAGE := ''Raise dblink test'');')" On 22.03.2016 12:

[GENERAL] dblink_exec: can it perform a remote function?

2016-03-22 Thread Thiemo Kellner
Hi all I am trying to execute a function on a remote server using dblink to test stuff. My function is: create or replace function /*LOGGER.*/WARN(in P_MESSAGE text) returns void as $warn$ begin raise debug '%', P_MESSAGE; raise log '%', P_MESSAGE; raise info