Re: Sync replication

2018-01-25 Thread Stephen Frost
Greetings Michael, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Thu, Jan 25, 2018 at 08:21:43PM -0500, Stephen Frost wrote: > > That's correct, which is why it's encouraged to have multiple replicas > > configured when using synchronous replication. In v10, it's possible to > > speci

Re: Sync replication

2018-01-25 Thread Michael Paquier
On Thu, Jan 25, 2018 at 08:21:43PM -0500, Stephen Frost wrote: > That's correct, which is why it's encouraged to have multiple replicas > configured when using synchronous replication. In v10, it's possible to > specify how many synchronous replicas are required to have acknowledged > a given tran

Re: Sync replication

2018-01-25 Thread Stephen Frost
Greetings, On our mailing lists, we prefer that replies be in-line and ask that users not top-post. Please see my response, in-line, below. * Azimuddin Mohammed (azim...@gmail.com) wrote: > So untill my slave comes up master does not commit any transaction which > means technically my db is non

Re: Sync replication

2018-01-25 Thread Rakesh Kumar
correct. -Original Message- From: Azimuddin Mohammed To: Rakesh Kumar Cc: pgsql-admin ; pgsql-general Sent: Thu, Jan 25, 2018 8:06 pm Subject: Re: Sync replication So untill my slave comes up master does not commit any transaction which means technically my db is non operative?

Re: Sync replication

2018-01-25 Thread Azimuddin Mohammed
So untill my slave comes up master does not commit any transaction which means technically my db is non operative? On Jan 25, 2018 12:23 PM, "Rakesh Kumar" wrote: > > >I have a question regarding synchronus replication. > >If i have a master and standby server will sync replication setup..when >

Re: A little RULE help?

2018-01-25 Thread Adrian Klaver
On 01/25/2018 03:34 PM, Steven Winfield wrote: Maybe this?: https://www.postgresql.org/docs/10/static/sql-createrule.html "There is a catch if you try to use conditional rules for complex view updates: there must be an unconditional INSTEAD rule for each action you wish to allow on the view. If

RE: A little RULE help?

2018-01-25 Thread Steven Winfield
Maybe this?: https://www.postgresql.org/docs/10/static/sql-createrule.html "There is a catch if you try to use conditional rules for complex view updates: there must be an unconditional INSTEAD rule for each action you wish to allow o

Re: A little RULE help?

2018-01-25 Thread Adrian Klaver
On 01/25/2018 03:21 PM, Steven Winfield wrote: Don't use RULEs. HTH. Why not? See: https://www.postgresql.org/docs/10/static/rules.html If you can understand what is going on then you are one up on me. -- Adrian Klaver adrian.kla...@aklaver.com

Re: A little RULE help?

2018-01-25 Thread Adrian Klaver
On 01/25/2018 12:53 PM, Steven Winfield wrote: Hi all, I’m trying to create a temporal table, from which data is never really deleted but each row “exists” for only a certain period of time, and a view of this table showing the currently “live” rows. I would also like the view to accept INSE

RE: A little RULE help?

2018-01-25 Thread Steven Winfield
> Don't use RULEs. HTH. Why not?

Re: A little RULE help?

2018-01-25 Thread Vik Fearing
On 01/25/2018 09:53 PM, Steven Winfield wrote: > Subject: A little RULE help? Don't use RULEs. HTH. -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

Re: pg 10.1 missing libpq in postgresql-devel

2018-01-25 Thread Adrian Klaver
On 01/25/2018 12:20 PM, support-tiger wrote: running postgresql 10.1 on Fedora 27.  Cannot install ruby pg gem due to missing libpq-fe.h file.  This is usually found in postgresql-devel but What was the error message returned when you tried to install originally? it is not in fedora 27 postgr

Re: AFTER UPDATE trigger updating other records

2018-01-25 Thread David G. Johnston
On Thu, Jan 25, 2018 at 3:06 PM, Ian Harding wrote: > > 4 |3 | Top.Bar.Blah > 5 |4 | Top.Bar.Blah.Scooby > ​​ > > barf$# UPDATE area SET areapath = (select areapath from area a > where areaid = area.parentid) || subpath(areapath, nlevel(areapath) - 1) > b

Re: AFTER UPDATE trigger updating other records

2018-01-25 Thread Ian Harding
On Thu, Jan 25, 2018 at 11:10 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wednesday, January 24, 2018, Ian Harding wrote: > >> >> -- This is not what I expect to see. I have even tried running the >> update >> -- unrestricted from within the trigger but I get the same result.

Re: AFTER UPDATE trigger updating other records

2018-01-25 Thread Ian Harding
On Thu, Jan 25, 2018 at 10:51 AM, Adrian Klaver wrote: > On 01/24/2018 09:45 PM, Ian Harding wrote: > >> I have a conditional after update trigger on a table that issues an >> update statement on the same table. The trigger does not fire recursively, >> and I know the rows are being updated, but

Re: PGSQL 10, many Random named DB

2018-01-25 Thread Merlin Moncure
On Thu, Jan 25, 2018 at 3:38 AM, Durumdara wrote: > Dear Members! > > Thank you for the suggestions. > Yes, the sysadmin allowed incoming connections from net. > We will check your list when we are there. Don't bother. We have a confirmed attack, time to take immediate remediation. 1. Disconnec

Re: pg 10.1 missing libpq in postgresql-devel

2018-01-25 Thread Martin Marques
El 25/01/18 a las 17:20, support-tiger escribió: > running postgresql 10.1 on Fedora 27.  Cannot install ruby pg gem due to > missing libpq-fe.h file.  This is usually found in postgresql-devel but > it is not in fedora 27 postgresql10-devel. If install postgresql-devel > (9.6) the gem installs wit

A little RULE help?

2018-01-25 Thread Steven Winfield
Hi all, I'm trying to create a temporal table, from which data is never really deleted but each row "exists" for only a certain period of time, and a view of this table showing the currently "live" rows. I would also like the view to accept INSERT, UPDATE, and DELETEs, and perform the relevant

pg 10.1 missing libpq in postgresql-devel

2018-01-25 Thread support-tiger
running postgresql 10.1 on Fedora 27.  Cannot install ruby pg gem due to missing libpq-fe.h file.  This is usually found in postgresql-devel but it is not in fedora 27 postgresql10-devel. If install postgresql-devel (9.6) the gem installs without problem but afraid this will interfere with 10.1

AFTER UPDATE trigger updating other records

2018-01-25 Thread David G. Johnston
On Wednesday, January 24, 2018, Ian Harding wrote: > > -- This is not what I expect to see. I have even tried running the update > -- unrestricted from within the trigger but I get the same result. From > -- outside the trigger I run the update unrestricted... > > UPDATE area SET areapath = (se

Re: AFTER UPDATE trigger updating other records

2018-01-25 Thread Adrian Klaver
On 01/24/2018 09:45 PM, Ian Harding wrote: I have a conditional after update trigger on a table that issues an update statement on the same table.  The trigger does not fire recursively, and I know the rows are being updated, but the update is not happening in the same way the statement does wh

Re: Sync replication

2018-01-25 Thread Rakesh Kumar
>I have a question regarding synchronus replication. >If i have a master and standby server will sync replication setup..when my >slave dies and master is still active. Will the transaction completes, or >>master will wait for slave to commit the transaction and then commits its. ? Master

Sync replication

2018-01-25 Thread Azimuddin Mohammed
I have a question regarding synchronus replication. If i have a master and standby server will sync replication setup..when my slave dies and master is still active. Will the transaction completes, or master will wait for slave to commit the transaction and then commits its. ?

Re: PostgreSQL 9.6: view based on sequence

2018-01-25 Thread Enrico Pirozzi
I found this db, it's not mine Thanks ;) Enrico Il 25/01/2018 18:07, Peter Eisentraut ha scritto: There is nothing from with user code using the data type "name". It's probably just not the best choice. But if you create a view over a system table, then you'll get whatever types the system

Deferrable constraint trigger

2018-01-25 Thread Maciej Kołuda
Hi All, I am trying to write constraint trigger to assure that at any given point of time I have an exactly one record "active" based on the time. To give you some background I would like to have an exactly one box per owner active in which items will be added. Part of the model looks like below:

Postgres and Unix groups

2018-01-25 Thread Rakesh Kumar
Is there a way to grant PG permissions to unix/LDAP groups instead of individuals. Seems like PG lacks it, unless there is an extension I am not aware of.

Re: PostgreSQL 9.6: view based on sequence

2018-01-25 Thread Peter Eisentraut
On 1/24/18 06:52, Enrico Pirozzi wrote: > PostgreSQL creates a view based on the sequence and the strange thing > is that, among the various fields that are created in the view, > there is a field named sequence_name with datatype name. > > I've seen in the docs > https://www.postgresql.org/

Re: Postgres for hadoop

2018-01-25 Thread Peter Eisentraut
On 1/25/18 02:36, Azimuddin Mohammed wrote: > Not really...currently i am using oracle for hadoop to store metatdata > information about the hadoop services. We are planning to shift to > postgres and replace oracle as source db. Maybe read this before you go there: http://peter.eisentraut.org/blo

Re: PGSQL 10, many Random named DB

2018-01-25 Thread Laurenz Albe
Durumdara wrote: > Somewhere the system administrator (who don't know the PG really) installed a > PGSQL server (10.x) with a database. > He couldn't manage the server well. > > Yesterday my colleague saw 21 databases in this server with random names. > He checked it with built in PGAdmin IV. > T

Re: PGSQL 10, many Random named DB

2018-01-25 Thread Durumdara
Dear Members! Thank you for the suggestions. Yes, the sysadmin allowed incoming connections from net. We will check your list when we are there. Thank you again! Best wishes dd

Re: Using Token (JWT) authentication mechanism in Postgres

2018-01-25 Thread Alexander Kukushkin
Hi, 2018-01-24 22:27 GMT+01:00 Julio Cesar Tenganan Daza : > Hello, > > > > I would like to know if is possible to use Token (JWT) authentication > mechanism in Postgres? In order to authenticate users and also authorize > access to specific tables, This is in a multi-tenant application context