Re: [GENERAL] BDR workers exiting?

2015-10-12 Thread Steve Pribyl
The process used to created this

Start with clean db
Create host A database with bdr
Join host B with dbr
Load database using psql < file.sql

I was able to get it work if I do the following.
Start with clean db
Create host A database
Load data on host A
Join host A to bdr.
Join host b to bdr.

Glad to have a work around but would like to get to understand the failure.

Steve Pribyl




From: Steve Pribyl
Sent: Monday, October 12, 2015 11:19 AM
To: Andres Freund
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] BDR workers exiting?

Yup, there is a disconnect on other side.

This disconnect is preceded by this.
ERROR,XX000,"invalid memory alloc request size 1073741824","slot 
""bdr_16494_6204748238611542317_1_16494__"", output plugin ""bdr"", in the 
change callback, associated LSN 2/FD250E48""bdr 
(6204748238611542317,1,16494,):receive"

Steve Pribyl


____
From: Andres Freund 
Sent: Monday, October 12, 2015 11:08 AM
To: Steve Pribyl
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] BDR workers exiting?

On 2015-10-12 14:37:07 +, Steve Pribyl wrote:
> I am loading up a 60G database into BDR database and these "ERRORS" are in my 
> logs.  Is not normal behavior or is something going bad.
>
> 2015-10-12 09:28:59.389 CDT,,,30371,,561bc17d.76a3,1,,2015-10-12 09:19:41 
> CDT,5/0,0,ERROR,XX000,"data stream ended","bdr 
> (6204748238611542317,1,16494,): apply"
> 2015-10-12 09:28:59.390 CDT,,,12693,,561bb1ae.3195,20,,2015-10-12 08:12:14 
> CDT,,0,LOG,0,"worker process: bdr (6204748238611542317,1,16494,)->bdr 
> (6204748255428234532,1, (PID 30371) exited with exit code 1",""
> 2015-10-12 09:29:04.395 CDT,,,12693,,561bb1ae.3195,21,,2015-10-12 08:12:14 
> CDT,,0,LOG,0,"starting background worker process ""bdr 
> (6204748238611542317,1,16494,)->bdr (6204748255428234532,1,""",""

There'll possibly be an error message on the other node about ending the
connection.

Do you use SSL? If so, try disabling renegotiation.

Regards,

Andres

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] BDR workers exiting?

2015-10-12 Thread Steve Pribyl
Yup, there is a disconnect on other side.

This disconnect is preceded by this.
ERROR,XX000,"invalid memory alloc request size 1073741824","slot 
""bdr_16494_6204748238611542317_1_16494__"", output plugin ""bdr"", in the 
change callback, associated LSN 2/FD250E48",,,,"bdr 
(6204748238611542317,1,16494,):receive"

Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com
Desk: 312-994-4646



From: Andres Freund 
Sent: Monday, October 12, 2015 11:08 AM
To: Steve Pribyl
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] BDR workers exiting?

On 2015-10-12 14:37:07 +, Steve Pribyl wrote:
> I am loading up a 60G database into BDR database and these "ERRORS" are in my 
> logs.  Is not normal behavior or is something going bad.
>
> 2015-10-12 09:28:59.389 CDT,,,30371,,561bc17d.76a3,1,,2015-10-12 09:19:41 
> CDT,5/0,0,ERROR,XX000,"data stream ended","bdr 
> (6204748238611542317,1,16494,): apply"
> 2015-10-12 09:28:59.390 CDT,,,12693,,561bb1ae.3195,20,,2015-10-12 08:12:14 
> CDT,,0,LOG,0,"worker process: bdr (6204748238611542317,1,16494,)->bdr 
> (6204748255428234532,1, (PID 30371) exited with exit code 1",""
> 2015-10-12 09:29:04.395 CDT,,,12693,,561bb1ae.3195,21,,2015-10-12 08:12:14 
> CDT,,0,LOG,0,"starting background worker process ""bdr 
> (6204748238611542317,1,16494,)->bdr (6204748255428234532,1,""",""

There'll possibly be an error message on the other node about ending the
connection.

Do you use SSL? If so, try disabling renegotiation.

Regards,

Andres

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] BDR workers exiting?

2015-10-12 Thread Steve Pribyl
I am loading up a 60G database into BDR database and these "ERRORS" are in my 
logs.  Is not normal behavior or is something going bad.

2015-10-12 09:28:59.389 CDT,,,30371,,561bc17d.76a3,1,,2015-10-12 09:19:41 
CDT,5/0,0,ERROR,XX000,"data stream ended","bdr 
(6204748238611542317,1,16494,): apply"
2015-10-12 09:28:59.390 CDT,,,12693,,561bb1ae.3195,20,,2015-10-12 08:12:14 
CDT,,0,LOG,0,"worker process: bdr (6204748238611542317,1,16494,)->bdr 
(6204748255428234532,1, (PID 30371) exited with exit code 1",""
2015-10-12 09:29:04.395 CDT,,,12693,,561bb1ae.3195,21,,2015-10-12 08:12:14 
CDT,,0,LOG,0,"starting background worker process ""bdr 
(6204748238611542317,1,16494,)->bdr (6204748255428234532,1,""",""


Steve Pribyl
Thanks

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] backup.old

2015-10-07 Thread Steve Pribyl
Thank you very much.  I read someplace if you run pg_start_backup twice the 
backup.old will be created, but there was not much beyond that and now I can't 
seem to find the reference.


Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com<mailto:steve.pri...@akunacapital.com>
Desk: 312-994-4646




From: David G. Johnston 
Sent: Wednesday, October 7, 2015 2:25 PM
To: Steve Pribyl
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] backup.old

On Wed, Oct 7, 2015 at 3:16 PM, Steve Pribyl 
mailto:steve.pri...@akunacapital.com>> wrote:

Great, dur(rtfm), so is it save to delete the backup.old, if the db is not in 
backup mode.

I don't see anything that would cause "backup.old" to be linked to an active 
backup if there was one in progress...and as far as I can tell a successfully 
completed backup doesn't leave around any such file either.  So it should be 
safe to delete regardless of what pg_is_in_backup returns.  If that returns 
true then I would be concerned that something (or someone) else is messing with 
the backup/data directory and that something likely also introduced backup.old

David J.


[http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


Re: [GENERAL] backup.old

2015-10-07 Thread Steve Pribyl
Great, dur(rtfm), so is it save to delete the backup.old, if the db is not in 
backup mode.


Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com<mailto:steve.pri...@akunacapital.com>
Desk: 312-994-4646




From: David G. Johnston 
Sent: Wednesday, October 7, 2015 2:12 PM
To: Steve Pribyl
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] backup.old

On Wed, Oct 7, 2015 at 2:58 PM, Steve Pribyl 
mailto:steve.pri...@akunacapital.com>> wrote:
Good Afternoon,

We are in a bit of pickle with this as I think some of the issues we may be 
having could possible be caused by being backup mode for months.

What can I check or do to make sure the db is not in backup mode and under what 
circumstances/how can I remove that backup.old file?

um...

http://www.postgresql.org/docs/9.3/interactive/functions-admin.html#FUNCTIONS-ADMIN-BACKUP-TABLE

pg_is_in_backup()

David J.


[http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


Re: [GENERAL] backup.old

2015-10-07 Thread Steve Pribyl
Good Afternoon,

We are in a bit of pickle with this as I think some of the issues we may be 
having could possible be caused by being backup mode for months.  

What can I check or do to make sure the db is not in backup mode and under what 
circumstances/how can I remove that backup.old file?
 
Thanks
Steve Pribyl



From: pgsql-general-ow...@postgresql.org  
on behalf of Steve Pribyl 
Sent: Tuesday, October 6, 2015 10:47 PM
To: John R Pierce; pgsql-general@postgresql.org
Subject: Re: [GENERAL] backup.old

Honestly I don't know.  It was either pg_dump or a recovery script, that would 
have included a call to pg_start_backup.   It does have the start_backup 
looking format.

START WAL LOCATION: F3/128 (file 004500F30001)
CHECKPOINT LOCATION: F3/160
BACKUP METHOD: pg_start_backup
BACKUP FROM: master
START TIME: 2015-05-30 01:39:24 CDT
LABEL: base-backup

Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com
Desk: 312-994-4646



From: pgsql-general-ow...@postgresql.org  
on behalf of John R Pierce 
Sent: Tuesday, October 6, 2015 10:43 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] backup.old

On 10/6/2015 8:28 PM, Steve Pribyl wrote:
> What do I need to do to recover a database server that has a backup.old file 
> in the data_directory.  I have see references to a database being stopped 
> during a backup and/or a second backup running and moving the old file aside, 
> but it was not clear to me what needs to be done do recover.
>
> postgresql-9.3   9.3.0-2.pgdg12.4+1


what method or software were you using to perform this backup?


--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] backup.old

2015-10-06 Thread Steve Pribyl
Honestly I don't know.  It was either pg_dump or a recovery script, that would 
have included a call to pg_start_backup.   It does have the start_backup 
looking format.

START WAL LOCATION: F3/128 (file 004500F30001)
CHECKPOINT LOCATION: F3/160
BACKUP METHOD: pg_start_backup
BACKUP FROM: master
START TIME: 2015-05-30 01:39:24 CDT
LABEL: base-backup

Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com
Desk: 312-994-4646



From: pgsql-general-ow...@postgresql.org  
on behalf of John R Pierce 
Sent: Tuesday, October 6, 2015 10:43 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] backup.old

On 10/6/2015 8:28 PM, Steve Pribyl wrote:
> What do I need to do to recover a database server that has a backup.old file 
> in the data_directory.  I have see references to a database being stopped 
> during a backup and/or a second backup running and moving the old file aside, 
> but it was not clear to me what needs to be done do recover.
>
> postgresql-9.3   9.3.0-2.pgdg12.4+1


what method or software were you using to perform this backup?


--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] backup.old

2015-10-06 Thread Steve Pribyl
Good Evening,

What do I need to do to recover a database server that has a backup.old file in 
the data_directory.  I have see references to a database being stopped during a 
backup and/or a second backup running and moving the old file aside, but it was 
not clear to me what needs to be done do recover.

postgresql-9.3   9.3.0-2.pgdg12.4+1

TIA
Steve


 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] BDR Rejoin of failed node, hangs.

2015-10-06 Thread Steve Pribyl
That was it thanks.

Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com
Desk: 312-994-4646



From: Craig Ringer 
Sent: Tuesday, October 6, 2015 12:35 AM
To: Steve Pribyl
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] BDR Rejoin of failed node, hangs.

On 5 October 2015 at 20:58, Steve Pribyl  wrote:

> Clean up node 1.
>select bdr.bdr_part_by_node_names('{node2}');
>delete from bdr.bdr_nodes where node_status='k';

You need to delete the bdr.bdr_connections entry too.

0.9.3 will fix that, so orphan connections entries and those
associated with terminated nodes are ignored.

--
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | spri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] BDR Rejoin of failed node, hangs.

2015-10-05 Thread Steve Pribyl
Good Morning,

Has anyone had a moment to look at this?
It is a bit of a show stopper.

Thanks Steve


From: pgsql-general-ow...@postgresql.org  
on behalf of Steve Pribyl 
Sent: Thursday, October 1, 2015 12:27 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] BDR Rejoin of failed node, hangs.

Good Afternoon,

I am in the process of testing out BDR and am having problems rejoining after a 
simulated loss of one node.   The join hangs while waiting to complete and 
there interesting errors in the logs.


Simulation process
After creating the database on both nodes.

Shutdown postgres and reset db on node 2
   rm -rf /var/lib/postgresql/9.4/main/*
   /usr/lib/postgresql/9.4/bin/initdb -D /var/lib/postgresql/9.4/main -A trust 
-U postgre

Clean up node 1.
   select bdr.bdr_part_by_node_names('{node2}');
   delete from bdr.bdr_nodes where node_status='k';

When I try to re-add node2
Using the NODE 2 Create sql again, it hangs
SELECT bdr.bdr_node_join_wait_for_ready(); hangs.

The log on node2  has errors
http://pastebin.com/8ZsTe5cG
55000: System identification mismatch between connection and slot
0: worker process: bdr db: bdrdemo (PID 12042) exited with exit code 1

The log on node1 does not have any errors.
http://pastebin.com/njVJ9WX7

Both nodes show up in select * from bdr.bdr_nodes; on node1 and node2;

Database Creation:
NODE 1
create database bdrdemo;
\connect bdrdemo
CREATE EXTENSION btree_gist;
CREATE EXTENSION bdr;
select bdr.bdr_group_create(local_node_name := 'node1', node_external_dsn := 
'host=192.168.101.41 port=5432 dbname=bdrdemo');
SELECT bdr.bdr_node_join_wait_for_ready();

NODE 2
create database bdrdemo;
\connect bdrdemo
CREATE EXTENSION btree_gist;
CREATE EXTENSION bdr;
select bdr.bdr_group_join(local_node_name := 'node2', node_external_dsn := 
'host=192.168.101.42 port=5432 dbname=bdrdemo', join_using_dsn := 
'host=192.168.101.41 port=5432 dbname=bdrdemo');
SELECT bdr.bdr_node_join_wait_for_ready();


Ubuntu 14.04 packages
ii  postgresql-bdr-9.4  9.4.4-1trusty amd64 
   object-relational SQL database, version 9.4 server
ii  postgresql-bdr-9.4-bdr-plugin   0.9.2-1trusty amd64 
   BDR Plugin for PostgreSQL-BDR 9.4
ii  postgresql-bdr-client-9.4   9.4.4-1trusty amd64 
   front-end programs for PostgreSQL-BDR 9.4
ii  postgresql-bdr-contrib-9.4  9.4.4-1trusty amd64 
   additional facilities for PostgreSQL
ii  postgresql-client-common154   all   
   manager for multiple PostgreSQL client versions
ii  postgresql-common   154   all   
   PostgreSQL database-cluster manager

TIA,
Steve
________
 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | spri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
________
 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | spri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. I

[GENERAL] BDR Rejoin of failed node, hangs.

2015-10-01 Thread Steve Pribyl
Good Afternoon,

I am in the process of testing out BDR and am having problems rejoining after a 
simulated loss of one node.   The join hangs while waiting to complete and 
there interesting errors in the logs.


Simulation process
After creating the database on both nodes.

Shutdown postgres and reset db on node 2
   rm -rf /var/lib/postgresql/9.4/main/*
   /usr/lib/postgresql/9.4/bin/initdb -D /var/lib/postgresql/9.4/main -A trust 
-U postgre

Clean up node 1.
   select bdr.bdr_part_by_node_names('{node2}');
   delete from bdr.bdr_nodes where node_status='k';

When I try to re-add node2
Using the NODE 2 Create sql again, it hangs
SELECT bdr.bdr_node_join_wait_for_ready(); hangs.

The log on node2  has errors
http://pastebin.com/8ZsTe5cG
55000: System identification mismatch between connection and slot
0: worker process: bdr db: bdrdemo (PID 12042) exited with exit code 1

The log on node1 does not have any errors.
http://pastebin.com/njVJ9WX7

Both nodes show up in select * from bdr.bdr_nodes; on node1 and node2;

Database Creation:
NODE 1
create database bdrdemo;
\connect bdrdemo
CREATE EXTENSION btree_gist;
CREATE EXTENSION bdr;
select bdr.bdr_group_create(local_node_name := 'node1', node_external_dsn := 
'host=192.168.101.41 port=5432 dbname=bdrdemo');
SELECT bdr.bdr_node_join_wait_for_ready();

NODE 2
create database bdrdemo;
\connect bdrdemo
CREATE EXTENSION btree_gist;
CREATE EXTENSION bdr;
select bdr.bdr_group_join(local_node_name := 'node2', node_external_dsn := 
'host=192.168.101.42 port=5432 dbname=bdrdemo', join_using_dsn := 
'host=192.168.101.41 port=5432 dbname=bdrdemo');
SELECT bdr.bdr_node_join_wait_for_ready();


Ubuntu 14.04 packages
ii  postgresql-bdr-9.4  9.4.4-1trusty amd64 
   object-relational SQL database, version 9.4 server
ii  postgresql-bdr-9.4-bdr-plugin   0.9.2-1trusty amd64 
   BDR Plugin for PostgreSQL-BDR 9.4
ii  postgresql-bdr-client-9.4   9.4.4-1trusty amd64 
   front-end programs for PostgreSQL-BDR 9.4
ii  postgresql-bdr-contrib-9.4  9.4.4-1trusty amd64 
   additional facilities for PostgreSQL
ii  postgresql-client-common154   all   
   manager for multiple PostgreSQL client versions
ii  postgresql-common   154   all   
   PostgreSQL database-cluster manager

TIA,
Steve
________
 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m:  | f: +1 312 750 1667 | spri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] postgres db permissions

2015-06-02 Thread Steve Pribyl
This only seems to show up in pgadminIII, I am unable to see this grant using 
\dn+(but I am a bit of a novice).

postgres=# \dn+
  List of schemas
  Name  |  Owner   |  Access privileges   |  Description
+--+--+
 public | postgres | postgres=UC/postgres+| standard public schema
|  | =UC/postgres |


I would seem to me granting "public" access to the schema by default is bad.  
Granting access to just the required users is good.

Good:
CREATE SCHEMA public
  AUTHORIZATION postgres;

GRANT ALL ON SCHEMA public TO postgres;
COMMENT ON SCHEMA public

Bad and happens to be the default:
CREATE SCHEMA public
  AUTHORIZATION postgres;

GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
COMMENT ON SCHEMA public

Steve Pribyl



From: pgsql-general-ow...@postgresql.org  
on behalf of Steve Pribyl 
Sent: Tuesday, June 2, 2015 1:45 PM
To: Adrian Klaver; Melvin Davidson
Cc: Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgres db permissions

Thanks for clearing that up.

I seems that any database that gets created has "GRANT ALL ON SCHEMA public TO 
public" by default.  These are all clean installs.I have found this on 
Ubuntu 9.3, The Postgres 9.3 and 9.4 deb packages.

Default postgres from ubuntu, is the version I am testing on.
It seems to be the default install, though we might be a patch or two behind.
$ dpkg -l | grep postgres
ii  postgresql-9.39.3.5-0ubuntu0.14.04.1
amd64object-relational SQL database, version 9.3 server

I found this problem on a install from the postgres repo
$ dpkg -l postgresql-9.3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   VersionDescription
+++-==-==-
ii  postgresql-9.3 9.3.0-2.pgdg12 object-relational SQL database, version 9.3


$ dpkg -l postgresql-9.4
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  Architecture Description
+++-==---=
ii  postgresql-9.4 9.4.0-1.pgdg amd64object-relational SQL database, v


Steve Pribyl




 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] postgres db permissions

2015-06-02 Thread Steve Pribyl
Thanks for clearing that up.

I seems that any database that gets created has "GRANT ALL ON SCHEMA public TO 
public" by default.  These are all clean installs.I have found this on 
Ubuntu 9.3, The Postgres 9.3 and 9.4 deb packages.

Default postgres from ubuntu, is the version I am testing on.
It seems to be the default install, though we might be a patch or two behind.
$ dpkg -l | grep postgres
ii  postgresql-9.39.3.5-0ubuntu0.14.04.1
amd64object-relational SQL database, version 9.3 server

I found this problem on a install from the postgres repo
$ dpkg -l postgresql-9.3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   VersionDescription
+++-==-==-
ii  postgresql-9.3 9.3.0-2.pgdg12 object-relational SQL database, version 9.3


$ dpkg -l postgresql-9.4
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  Architecture Description
+++-==---=
ii  postgresql-9.4 9.4.0-1.pgdg amd64object-relational SQL database, v


Steve Pribyl




From: Adrian Klaver 
Sent: Tuesday, June 2, 2015 1:20 PM
To: Steve Pribyl; Melvin Davidson
Cc: Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgres db permissions

On 06/02/2015 11:04 AM, Steve Pribyl wrote:
> None of the roles have permissions on the postgres database.  At this
> point they don't have any permissions on any databases.
>
>
> I have noted that  "GRANT ALL ON SCHEMA public TO public" is granted
> on postgres.schemas.public.  I am looking at this in pgadmin so excuse
> my nomenclature.
>
>
> Is this what is allowing write access to the database?

Yes, though that should not be the default. See here:

http://www.postgresql.org/docs/9.4/interactive/sql-grant.html

PostgreSQL grants default privileges on some types of objects to PUBLIC.
No privileges are granted to PUBLIC by default on tables, columns,
schemas or tablespaces. For other types, the default privileges granted
to PUBLIC are as follows: CONNECT and CREATE TEMP TABLE for databases;
EXECUTE privilege for functions; and USAGE privilege for languages. The
object owner can, of course, REVOKE both default and expressly granted
privileges. (For maximum security, issue the REVOKE in the same
transaction that creates the object; then there is no window in which
another user can use the object.) Also, these initial default privilege
settings can be changed using the ALTER DEFAULT PRIVILEGES command.

So how exactly was Postgres installed and where there any scripts run
after the install?


>
>
> Steve Pribyl
> Sr. Systems Engineer
> steve.pri...@akunacapital.com <mailto:steve.pri...@akunacapital.com>
> Desk: 312-994-4646
>
> ----
> *From:* Melvin Davidson 
> *Sent:* Tuesday, June 2, 2015 12:55 PM
> *To:* Steve Pribyl
> *Cc:* Joshua D. Drake; pgsql-general@postgresql.org
> *Subject:* Re: [GENERAL] postgres db permissions
> Your problem is probably the "INHERIT" and
> GRANT dbA TO bob;
> GRANT dbA_ro TO bob;
> GRANT dbB TO bob;
> GRANT dbB_ro TO bob;
>
> options. If any of the dbA's have the permission to CREATE tables (and I
> suspect they do), so will bob.
>
>
> On Tue, Jun 2, 2015 at 1:50 PM, Steve Pribyl
> mailto:steve.pri...@akunacapital.com>>
> wrote:
>
> Josh,
>
> Via psql:
> CREATE ROLE bob LOGIN
>NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
> GRANT dbA TO bob;
> GRANT dbA_ro TO bob;
> GRANT dbB TO bob;
> GRANT dbB_ro TO bob;
>
> dbA, dbA_ro, dbB, and dbB_ro are roles.
>
> I have not created any database yet or assigned permissions to the
> roles.
>
> Steve Pribyl
>
>
>
> 
> From: pgsql-general-ow...@postgresql.org
> <mailto:pgsql-general-ow...@postgresql.org>
>  <mailto:pgsql-general-ow...@postgresql.org>> on behalf of Joshua D.
>     Drake mailto:j...@commandprompt.com>>
> Sent: Tuesday, June 2, 2015 12:44 PM
> To: pgsql-general@postgresql.org <mailto:pgsql-general@postgresql.org>
> Subject: Re: [GENERAL] postgres db permissions
>
> On 06/02/2015 10:36 AM, Steve Pribyl wrote:
>  >
>  > Good Afternoon,
>  >
>  >

Re: [GENERAL] postgres db permissions

2015-06-02 Thread Steve Pribyl
They all look like this.

CREATE ROLE dbA
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;

Steve Pribyl


From: Adrian Klaver 
Sent: Tuesday, June 2, 2015 1:06 PM
To: Steve Pribyl; Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgres db permissions

On 06/02/2015 10:50 AM, Steve Pribyl wrote:
> Josh,
>
> Via psql:
> CREATE ROLE bob LOGIN
>NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
> GRANT dbA TO bob;
> GRANT dbA_ro TO bob;
> GRANT dbB TO bob;
> GRANT dbB_ro TO bob;
>
> dbA, dbA_ro, dbB, and dbB_ro are roles.

The burning question would be, how where they created?

>
> I have not created any database yet or assigned permissions to the roles.
>
> Steve Pribyl
>
>
>
> 
> From: pgsql-general-ow...@postgresql.org  
> on behalf of Joshua D. Drake 
> Sent: Tuesday, June 2, 2015 12:44 PM
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] postgres db permissions
>
> On 06/02/2015 10:36 AM, Steve Pribyl wrote:
>>
>> Good Afternoon,
>>
>> Built a fresh 9.3. postgres server and added some users and noticed that any 
>> user can create tables in any database including the postgres database by 
>> default.
>>
>> Have I missed some step in securing the default install?
>
> How exactly did you add the users?
>
> JD
>
>
>
> --
> Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
> PostgreSQL Centered full stack support, consulting and development.
> Announcing "I'm offended" is basically telling the world you can't
> control your own emotions, so everyone else should do it for you.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
> 
>   [http://www.akunacapital.com/images/akuna.png]
> Steve Pribyl | Senior Systems Engineer
> Akuna Capital LLC
> 36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
> <http://www.akunacapital.com>
> p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
> steve.pri...@akunacapital.com
>
> Please consider the environment, before printing this email.
>
> This electronic message contains information from Akuna Capital LLC that may 
> be confidential, legally privileged or otherwise protected from disclosure. 
> This information is intended for the use of the addressee only and is not 
> offered as investment advice to be relied upon for personal or professional 
> use. Additionally, all electronic messages are recorded and stored in 
> compliance pursuant to applicable SEC rules. If you are not the intended 
> recipient, you are hereby notified that any disclosure, copying, 
> distribution, printing or any other use of, or any action in reliance on, the 
> contents of this electronic message is strictly prohibited. If you have 
> received this communication in error, please notify us by telephone at 
> (312)994-4640 and destroy the original message.
>
>


--
Adrian Klaver
adrian.kla...@aklaver.com

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] postgres db permissions

2015-06-02 Thread Steve Pribyl
None of the roles have permissions on the postgres database.  At this point 
they don't have any permissions on any databases.


I have noted that  "GRANT ALL ON SCHEMA public TO public" is granted on 
postgres.schemas.public.  I am looking at this in pgadmin so excuse my 
nomenclature.


Is this what is allowing write access to the database?


Steve Pribyl
Sr. Systems Engineer
steve.pri...@akunacapital.com<mailto:steve.pri...@akunacapital.com>
Desk: 312-994-4646


From: Melvin Davidson 
Sent: Tuesday, June 2, 2015 12:55 PM
To: Steve Pribyl
Cc: Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgres db permissions

Your problem is probably the "INHERIT" and
GRANT dbA TO bob;
GRANT dbA_ro TO bob;
GRANT dbB TO bob;
GRANT dbB_ro TO bob;

options. If any of the dbA's have the permission to CREATE tables (and I 
suspect they do), so will bob.


On Tue, Jun 2, 2015 at 1:50 PM, Steve Pribyl 
mailto:steve.pri...@akunacapital.com>> wrote:
Josh,

Via psql:
CREATE ROLE bob LOGIN
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
GRANT dbA TO bob;
GRANT dbA_ro TO bob;
GRANT dbB TO bob;
GRANT dbB_ro TO bob;

dbA, dbA_ro, dbB, and dbB_ro are roles.

I have not created any database yet or assigned permissions to the roles.

Steve Pribyl




From: 
pgsql-general-ow...@postgresql.org<mailto:pgsql-general-ow...@postgresql.org> 
mailto:pgsql-general-ow...@postgresql.org>> 
on behalf of Joshua D. Drake 
mailto:j...@commandprompt.com>>
Sent: Tuesday, June 2, 2015 12:44 PM
To: pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>
Subject: Re: [GENERAL] postgres db permissions

On 06/02/2015 10:36 AM, Steve Pribyl wrote:
>
> Good Afternoon,
>
> Built a fresh 9.3. postgres server and added some users and noticed that any 
> user can create tables in any database including the postgres database by 
> default.
>
> Have I missed some step in securing the default install?

How exactly did you add the users?

JD



--
Command Prompt, Inc. - http://www.commandprompt.com/  
503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
Sent via pgsql-general mailing list 
(pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | 
www.akunacapital.com<http://www.akunacapital.com> <http://www.akunacapital.com>
p: +1 312 994 4646 | m: 
847-343-2349 | f: +1 312 750 
1667 | 
steve.pri...@akunacapital.com<mailto:steve.pri...@akunacapital.com>

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 
and destroy the original message.


--
Sent via pgsql-general mailing list 
(pgsql-general@postgresql.org<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you. 
[http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/01.gif]

[http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally

Re: [GENERAL] postgres db permissions

2015-06-02 Thread Steve Pribyl
Josh,

Via psql:
CREATE ROLE bob LOGIN
  NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
GRANT dbA TO bob;
GRANT dbA_ro TO bob;
GRANT dbB TO bob;
GRANT dbB_ro TO bob;

dbA, dbA_ro, dbB, and dbB_ro are roles.

I have not created any database yet or assigned permissions to the roles.

Steve Pribyl




From: pgsql-general-ow...@postgresql.org  
on behalf of Joshua D. Drake 
Sent: Tuesday, June 2, 2015 12:44 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] postgres db permissions

On 06/02/2015 10:36 AM, Steve Pribyl wrote:
>
> Good Afternoon,
>
> Built a fresh 9.3. postgres server and added some users and noticed that any 
> user can create tables in any database including the postgres database by 
> default.
>
> Have I missed some step in securing the default install?

How exactly did you add the users?

JD



--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] postgres db permissions

2015-06-02 Thread Steve Pribyl
Good Afternoon,

Built a fresh 9.3. postgres server and added some users and noticed that any 
user can create tables in any database including the postgres database by 
default.

Have I missed some step in securing the default install?

Steve Pribyl



 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Detecting master/slave

2014-11-21 Thread Steve Pribyl
Is there a better/recommended way to determine which host in a cluster is the 
master or slave besides rescue.conf or pg_stat_replication?  Just looking for 
the "right" way to know which host is which.

Thanks

Steve

 [http://www.akunacapital.com/images/akuna.png]
Steve Pribyl | Senior Systems Engineer
Akuna Capital LLC
36 S Wabash, Suite 310 Chicago IL 60603 USA | www.akunacapital.com 
<http://www.akunacapital.com>
p: +1 312 994 4646 | m: 847-343-2349 | f: +1 312 750 1667 | 
steve.pri...@akunacapital.com

Please consider the environment, before printing this email.

This electronic message contains information from Akuna Capital LLC that may be 
confidential, legally privileged or otherwise protected from disclosure. This 
information is intended for the use of the addressee only and is not offered as 
investment advice to be relied upon for personal or professional use. 
Additionally, all electronic messages are recorded and stored in compliance 
pursuant to applicable SEC rules. If you are not the intended recipient, you 
are hereby notified that any disclosure, copying, distribution, printing or any 
other use of, or any action in reliance on, the contents of this electronic 
message is strictly prohibited. If you have received this communication in 
error, please notify us by telephone at (312)994-4640 and destroy the original 
message.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general