[GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo

2015-12-15 Thread Daniel Westermann
Hi, we try to dump a PostgreSQL 8.2.4 instance with pg_dump from version 9.4.5 (enterprisedb version) over the network. This is the error we get: pg_dump: [archiver (db)] query failed: ERROR: schema "sys" does not exist pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys,

[GENERAL] BDR

2015-12-15 Thread Andreas Kretschmer
Hi @ll, I would like to play with BDR, can i use my 9.5 / 9.6 installation (first attempt fails) or do i have to use 9.4 stable? Regards, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds)

Re: [GENERAL] BDR

2015-12-15 Thread John R Pierce
On 12/15/2015 12:01 AM, Andreas Kretschmer wrote: I would like to play with BDR, can i use my 9.5 / 9.6 installation (first attempt fails) or do i have to use 9.4 stable? 9.5 is a in-development version, 9.6 doesn't even exist, why would you want to use anything OTHER than the stable and

[GENERAL] wal receiver process always start after startup process recovering all WALs and need new WAL?

2015-12-15 Thread Jov
I ask this problem because I meet twice recently that the wal receiver process do not start after a long time. first time: I change recovery_min_apply_delay from default to 3d on a standby,the standby start but there is no receiver process,and on the master,pg_stat_replication show nothing.After

Re: [GENERAL] BDR

2015-12-15 Thread Andreas Kretschmer
John R Pierce wrote: > On 12/15/2015 12:01 AM, Andreas Kretschmer wrote: >> I would like to play with BDR, can i use my 9.5 / 9.6 installation >> (first attempt fails) or do i have to use 9.4 stable? > > 9.5 is a in-development version, 9.6 doesn't even exist, why would you

Re: [GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo

2015-12-15 Thread John R Pierce
On 12/15/2015 12:50 AM, Daniel Westermann wrote: we try to dump a PostgreSQL 8.2.4 instance with pg_dump from version 9.4.5 (enterprisedb version) over the network. This is the error we get: pg_dump: [archiver (db)] query failed: ERROR: schema "sys" does not exist pg_dump: [archiver (db)]

Re: [GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo

2015-12-15 Thread Daniel Westermann
From: "John R Pierce" To: pgsql-general@postgresql.org Sent: Tuesday, December 15, 2015 10:55:01 AM Subject: Re: [GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo On

Re: [GENERAL] pg_dump executed on a hosts against another host fails with pg_dump: [archiver (db)] query was: SET search_path = pg_catalog, sys, dbo

2015-12-15 Thread John R Pierce
On 12/15/2015 1:16 AM, John R Pierce wrote: sys and dbo are Oracle schemas, is this the Oracle compatible server eDB sells?contact their paid support, thats not really postgres anymore. let me correct that, its not the community version of postgres that this mail list supports. --

[GENERAL] Trigger function, C, lookup of attribute type

2015-12-15 Thread Paul
I'm writing a trigger procedure in C to catch updates to a table and write them to a log file. The function must walk along trigdata->tg_trigtuple pulling out the attributes, comparing them with those in trigdata->tg_newtuple and writing the diffs to a flat ASCII file. I've got a loop over the

Re: [GENERAL] Overhead changing varchar(2000) to text

2015-12-15 Thread Edson Richter
Em 15/12/2015 00:27, Jim Nasby escreveu: On 12/9/15 5:43 PM, Edson Richter wrote: Actually, the biggest change is that I don't have to keep another constraint between app and database - if I want to increase the user perceived space, now I just have to change the application (of course, under

Re: [GENERAL] Support for hardware tokens for server/replication private key

2015-12-15 Thread mdaswani
Thanks for the reply. I can now confirm that replication connections can work using a private key stored on a hardware token. Do you know if there's any way I can store the server key on the hardware token? -- View this message in context:

Re: [GENERAL] wal receiver process always start after startup process recovering all WALs and need new WAL?

2015-12-15 Thread Jim Nasby
On 12/15/15 2:49 AM, Jov wrote: I think this behavior for recovery_min_apply_delay is not good,because if the receiver do not fetch the wal for a long time(in these cases it must replay 3d's wal before wal receiver start),the master will delete the wal,and the standby will need be re do.

Re: [GENERAL] Trigger function, C, lookup of attribute type

2015-12-15 Thread Jim Nasby
On 12/15/15 4:42 AM, Paul wrote: I'm writing a trigger procedure in C to catch updates to a table and write them to a log file. You might find https://github.com/arkhipov/temporal_tables useful. Though, if you just want to log things to a file, you should check out http://pgaudit.org/. --

Re: [GENERAL] How to get the size of JSONB in bytes?

2015-12-15 Thread Jim Nasby
On 12/15/15 8:24 AM, Petr Korobeinikov wrote: The better approach is extract your length-validation logic into your application. That's really up to interpretation. The database is the only place the data is stored, and as such is the only place that can constrain that data in all places.

Re: [GENERAL] How to get the size of JSONB in bytes?

2015-12-15 Thread Dmitry Savenko
Hi, Petr, Jim, thank you for suggestions and thoughts. Now I see, that you can't cast 'jsonb' to 'bytea' directly, but you can do it through 'text'. I modified my trigger like this create function check_document() returns trigger as $$ begin if 10240 < octet_length(new.jdoc::text::bytea)

Re: [GENERAL] dblink_connect fails

2015-12-15 Thread Joe Conway
On 12/15/2015 06:24 PM, James Sewell wrote: > I have a Windows PostgreSQL server where dblink_connect fails to pick up > the current user as follows: > ffm=# SELECT dblink_connect('master', 'dbname=ffm'); > ERROR: could not establish connection > DETAIL: FATAL: role

Re: [GENERAL] How to get the size of JSONB in bytes?

2015-12-15 Thread David G. Johnston
On Tue, Dec 15, 2015 at 9:54 PM, Dmitry Savenko wrote: > > and now it works! I think they should add casting to 'bytea' directly, > such workarounds shouldn't be necessary. > Casting to bytea and counting the bytes is just as hackey, IMO. If this use-case wants to be

Re: [GENERAL] Trigger function, C, lookup of attribute type

2015-12-15 Thread Paul
I found the solution: SPI_gettype() does the job fine. I was led to that by rummaging through the slony source code to see how they handle the triggers in C. -- Paul Nicholson -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] How to get the size of JSONB in bytes?

2015-12-15 Thread Dmitry Savenko
Hi, I want to impose size restrictions on JSONB documents stored in my table. Say, no document over 10Kb must be inserted in the table. For that, I try to write a trigger like this (jdoc here is of JSONB type): create function check_document() returns trigger as $$ begin    if 10 * 1024 <

Re: [GENERAL] Deletion Challenge

2015-12-15 Thread Berend Tober
Jim Nasby wrote: On 12/9/15 7:59 PM, Berend Tober wrote: This project is a game, btw, described at You might be interested in https://schemaverse.com/ Schemaverse looks somewhat interesting. Seems like it and Fairwinds share in common Postgresql as a foundation, but they are very

Re: [GENERAL] BDR

2015-12-15 Thread Craig Ringer
On 15 December 2015 at 16:49, Andreas Kretschmer wrote: > BDR is currently an addon for 9.4, I don't believe its available for 9.5 > > yet. > > apparently, thx for the answer. Correct, there's no BDR for 9.5. There's a pretty good chance we'll skip 9.5 entirely and

Re: [GENERAL] How to get the size of JSONB in bytes?

2015-12-15 Thread Petr Korobeinikov
> > This doesn't work because it can't cast JSONB to 'bytea'. I tried casting > to 'text', still no luck. Could anyone please help me? > You can use check-constraint like this: # create table t ( jb jsonb ); # alter table t add constraint jb_length_check CHECK (length(jb::text) < 16); -- 16

Re: [GENERAL] Permissions, "soft read failure" - wishful thinking?

2015-12-15 Thread George Neuner
On Mon, 14 Dec 2015 09:55:02 -0800, Benjamin Smith wrote: >Is there a way to set PG field-level read permissions so that a deny doesn't >cause the query to bomb, but the fields for which permission is denied to be >nullified? How about using encryption?

[GENERAL] dblink_connect fails

2015-12-15 Thread James Sewell
Hey all, I have a Windows PostgreSQL server where dblink_connect fails to pick up the current user as follows: #psql -h localhost -U postgres ffm ffm=# select version(); version - PostgreSQL 9.4.5, compiled

[GENERAL] Does PostgreSQL support to write glusterfs by Libgfapi

2015-12-15 Thread zh1029
Hi, It seems low performance PostgreSQL(9.3.6) while writing data to glusterFS distributed file system. libgfapi is provide since GlusterFS version 3.4 to avoid kernel visits/data copy which can improve its performance. But I didn't find out any instruction from the PostgreSQL web page. Do you

Re: [GENERAL] BDR

2015-12-15 Thread Andreas Kretschmer
Craig Ringer wrote: > On 15 December 2015 at 16:49, Andreas Kretschmer > wrote: > > > > BDR is currently an addon for 9.4, I don't believe its available for 9.5 > > yet. > > apparently, thx for the answer. > > > Correct, there's

Re: [GENERAL] Permissions, "soft read failure" - wishful thinking?

2015-12-15 Thread Stephen Frost
Benjamin, * Benjamin Smith (li...@benjamindsmith.com) wrote: > Is there a way to set PG field-level read permissions so that a deny doesn't > cause the query to bomb, but the fields for which permission is denied to be > nullified? Not directly, no. One approach would be to create views