Re: [GENERAL] Is there a way to get an update date for objects in pg_class

2014-07-14 Thread Michael Paquier
On Tue, Jul 15, 2014 at 9:42 AM, Néstor Boscán wrote: > I want to know if there is a way to get the last modified date of the > objects structure like tables, views or sequences. Not directly within the server if this is what you mean as catalog tables do not track timestamps when changes to an o

Re: [GENERAL] Quering complete PLPGSQL code

2014-07-14 Thread Adrian Klaver
On 07/14/2014 07:15 PM, Néstor Boscán wrote: What's really strange is that the function is returning the code like this: FUNCTION public."PRUEBA_FUNCION2"(p_1 integer, OUT p_2 integer, INOUT p_3 integer, VARIADIC p_4 integer[]) RETURNS SETOF record LANGUAGE plpgsql IMMUTABLE STRICT SECURIT

Re: [GENERAL] Quering complete PLPGSQL code

2014-07-14 Thread Néstor Boscán
What's really strange is that the function is returning the code like this: FUNCTION public."PRUEBA_FUNCION2"(p_1 integer, OUT p_2 integer, INOUT p_3 integer, VARIADIC p_4 integer[]) RETURNS SETOF record LANGUAGE plpgsql IMMUTABLE STRICT SECURITY DEFINER ROWS 200 AS $function$begin null; end;

[GENERAL] Is there a way to get an update date for objects in pg_class

2014-07-14 Thread Néstor Boscán
Hi I want to know if there is a way to get the last modified date of the objects structure like tables, views or sequences. Regards, Néstor

Re: [GENERAL] Quering complete PLPGSQL code

2014-07-14 Thread Néstor Boscán
Thanks a lot that worked!!! On Mon, Jul 14, 2014 at 6:53 PM, Jerry Sievers wrote: > Néstor Boscán writes: > > > Hi > > > > I want to get the PLPGSQL code from the PostgreSQL 9.1 database. I've > used pg_proc that only gives me the body of the code. Is there a Postgres > function that can build

Re: [GENERAL] Quering complete PLPGSQL code

2014-07-14 Thread John R Pierce
On 7/14/2014 3:33 PM, Néstor Boscán wrote: I want to get the PLPGSQL code from the PostgreSQL 9.1 database. I've used pg_proc that only gives me the body of the code. Is there a Postgres function that can build all the code? pg_dump can do that... to see how to do it yourself, you'll need t

Re: [GENERAL] Quering complete PLPGSQL code

2014-07-14 Thread Jerry Sievers
Néstor Boscán writes: > Hi > > I want to get the PLPGSQL code from the PostgreSQL 9.1 database. I've used > pg_proc that only gives me the body of the code. Is there a Postgres function > that can build > all the code? pg_get_functiondef(oid) > > Regards, > > Néstor > -- Jerry Sievers Pos

Re: [GENERAL] Why corruption memory in one database affects all the cluster?

2014-07-14 Thread Jeff Janes
On Mon, Jul 14, 2014 at 1:20 PM, Jeff Janes wrote: > On Sun, Jul 13, 2014 at 12:07 PM, Ru Devel wrote: > >> Hello, >> >> I have postgres 9.3.4 running on linux, and ~20 databases in the cluster. >> >> All the cluster was migrated from 9.2 using pg_upgradecluster. >> >> After migration autovacuum

[GENERAL] Quering complete PLPGSQL code

2014-07-14 Thread Néstor Boscán
Hi I want to get the PLPGSQL code from the PostgreSQL 9.1 database. I've used pg_proc that only gives me the body of the code. Is there a Postgres function that can build all the code? Regards, Néstor

Re: [GENERAL] BDR: Strange values in pg_stat_replication

2014-07-14 Thread Martin Gudmundsson
Hi! Never mind this one. Wrong config of synchronous replication by me. It looks good once I got the replication setup correctly. Kind regards, Martin 13 jul 2014 kl. 23:10 skrev Martin Gudmundsson : > Hi! > I wanted to test synchronous bi-dircetional replication using > synchronous_standby_

Re: [GENERAL] Why corruption memory in one database affects all the cluster?

2014-07-14 Thread Jeff Janes
On Sun, Jul 13, 2014 at 12:07 PM, Ru Devel wrote: > Hello, > > I have postgres 9.3.4 running on linux, and ~20 databases in the cluster. > > All the cluster was migrated from 9.2 using pg_upgradecluster. > > After migration autovacuum started to fail in one database, causing entire > cluster cras

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-07-14 Thread Vasudevan, Ramya
We turned off NUMA in the BIOS on Jul 2nd and haven't seen the issue since - (though once last week, we had the connections count go up to 1000, but recovered in few seconds on its own). Will keep you all posted when I have more updates. Appreciate everyone's help, comments and suggestions so f

[GENERAL] BDR: Strange values in pg_stat_replication

2014-07-14 Thread Martin Gudmundsson
Hi! I wanted to test synchronous bi-dircetional replication using synchronous_standby_names with bdr. So I set this up as follows: Node alpha has the following settings in postgresql.conf port=5432 wal_level = 'logical' max_replication_slots = 3 max_wal_senders = 4 synchronous_standby_names=’bet

Re: [GENERAL] Bi-Directional replication client awareness

2014-07-14 Thread Martin Gudmundsson
13 jul 2014 kl. 21:54 skrev Martin Gudmundsson : > >> I think we (as in postgres) will probably get the ability to run >> individual transactions in such a mode, but you surely wouldn't want to >> run every transaction in it. >> > > So, would then these transactions be ”2-phase”? Sorry, should

[GENERAL] Why corruption memory in one database affects all the cluster?

2014-07-14 Thread Ru Devel
Hello, I have postgres 9.3.4 running on linux, and ~20 databases in the cluster. All the cluster was migrated from 9.2 using pg_upgradecluster. After migration autovacuum started to fail in one database, causing entire cluster crashes: 2014-07-13 21:16:24 MSK [5665]: [1-1] db=,user= PANIC: co

Re: [GENERAL] Bi-Directional replication client awareness

2014-07-14 Thread Martin Gudmundsson
> I think we (as in postgres) will probably get the ability to run > individual transactions in such a mode, but you surely wouldn't want to > run every transaction in it. > So, would then these transactions be ”2-phase”? I mean either all nodes commit the transaction or none of them do? Or o

Re: [GENERAL] security labels or sensitivity markings

2014-07-14 Thread Stephen Frost
* sumita (su...@avaya.com) wrote: > Does postgresql support the use of security labels or sensitivity markings? For tables, yes, but not yet for rows/RLS. There is ongoing work in this area and the hope is that there will be some form of RLS in 9.5. As mentioned, security barrier views can be u

[GENERAL] operator is not unique: smallint[] @> smallint[] You might need to add explicit type casts (!)

2014-07-14 Thread Marc Mamin
Hello, (Postgres 9.3.4) I don't know how to apply the tip provided along with the error message :-) This issue may be related to the usage of intarray that seems to have added an _int4 @> _int4 operator to public: set search_path=public; select '{1}'::int2[] @> '{1}'::int2[] operator is not u

Re: [GENERAL] security labels or sensitivity markings

2014-07-14 Thread Geoff Montee
On Mon, Jul 14, 2014 at 2:23 AM, sumita wrote: > Does postgresql support the use of security labels or sensitivity > markings? > > > If what you want is some kind of row-level security, you have to roll your own when using PostgreSQL. Security_barrier views are a good option for this. See: http