Re: CREATE OR REPLACE MATERIALIZED VIEW

2019-01-09 Thread Aidan Samuel
On Thu, 10 Jan 2019 at 12:13, Tom Lane wrote: > For indivisible database objects such as functions, IMV the "or replace" > semantics (COR) is better than the "if not exists" semantics (CINE)... > > For tables, though, the tradeoffs seem pretty different... Thanks Tom, your explanation makes a lot

Re: CREATE OR REPLACE MATERIALIZED VIEW

2019-01-09 Thread Tom Lane
Aidan Samuel writes: > How come table creation doesn't allow [ OR REPLACE ], and view creation > doesn't allow [ IF NOT EXISTS ]? Is this just how the SQL spec defines > things? I think all that stuff is our own fault rather than something you can find in the SQL spec. For indivisible database o

CREATE OR REPLACE MATERIALIZED VIEW

2019-01-09 Thread Aidan Samuel
I've been looking over the syntax for creating various database objects: tables, views, functions, etc., and I wondered why there seem to be some discrepancies. For example, table creation syntax features [ IF NOT EXISTS ] but doesn't feature [ OR REPLACE ], function creation syntax is the inverse

Re: postgres operational

2019-01-09 Thread Martín Marqués
El 9/1/19 a las 17:38, Ron escribió: > On 1/9/19 12:19 PM, Martín Marqués wrote: >> El 9/1/19 a las 14:58, Steve Clark escribió: >>> Hi List, >>> >>> Is there a sure fire way to tell if postgres server is up an >>> operational. I was testing to see if the >>> socket at /tmp/.s.PGSQL.5432 existed -

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Martín Marqués
El 9/1/19 a las 20:22, Mark Fletcher escribió: > On Wed, Jan 9, 2019 at 12:58 PM github kran > wrote: > > > Mark - just curious to know on the logical replication. Do you think > I can use it for my use case where i need to publish data to a > subscriber

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Mark Fletcher
On Wed, Jan 9, 2019 at 12:58 PM github kran wrote: > > Mark - just curious to know on the logical replication. Do you think I can > use it for my use case where i need to publish data to a subscriber when > there is a change in the data updated for a row or any new inserts > happening on the tabl

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread github kran
On Wed, Jan 9, 2019 at 12:36 PM Mark Fletcher wrote: > On Wed, Jan 9, 2019 at 10:10 AM github kran wrote: > >> Mark - We are currently on 9.6 version of postgres and cant use this >> feature of logical replication.Answering to your question we are looking >> for any changes in the data related t

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread github kran
On Wed, Jan 9, 2019 at 12:26 PM Rob Sargent wrote: > > > On Jan 9, 2019, at 11:11 AM, github kran wrote: > > Rob - It's a Java based application. We dont have triggers yet on the > table and is trigger a only option in 9.6 version ?. > > On Wed, Jan 9, 2019 at 12:01 PM Rob Sargent wrote: > >>

Re: postgres operational

2019-01-09 Thread Ron
On 1/9/19 12:19 PM, Martín Marqués wrote: El 9/1/19 a las 14:58, Steve Clark escribió: Hi List, Is there a sure fire way to tell if postgres server is up an operational. I was testing to see if the socket at /tmp/.s.PGSQL.5432 existed - but I ran into a recent problem on CentOS 7.5, postgresq

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Mark Fletcher
On Wed, Jan 9, 2019 at 10:10 AM github kran wrote: > Mark - We are currently on 9.6 version of postgres and cant use this > feature of logical replication.Answering to your question we are looking > for any changes in the data related to a specific table ( changes like any > update on a timestamp

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Rob Sargent
> On Jan 9, 2019, at 11:11 AM, github kran wrote: > > Rob - It's a Java based application. We dont have triggers yet on the table > and is trigger a only option in 9.6 version ?. > > On Wed, Jan 9, 2019 at 12:01 PM Rob Sargent > wrote: > > > On 1/9/19 10:2

Re: postgres operational

2019-01-09 Thread Martín Marqués
El 9/1/19 a las 14:58, Steve Clark escribió: > Hi List, > > Is there a sure fire way to tell if postgres server is up an operational. I > was testing to see if the > socket at /tmp/.s.PGSQL.5432 existed - but I ran into a recent problem on > CentOS 7.5, postgresql 9.2.24, where the > socket was

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread github kran
Rob - It's a Java based application. We dont have triggers yet on the table and is trigger a only option in 9.6 version ?. On Wed, Jan 9, 2019 at 12:01 PM Rob Sargent wrote: > > On 1/9/19 10:21 AM, github kran wrote: > > Thanks for your reply Rob. Reading the below documentation link says the

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread github kran
Mark - We are currently on 9.6 version of postgres and cant use this feature of logical replication.Answering to your question we are looking for any changes in the data related to a specific table ( changes like any update on a timestamp field OR any new inserts happened in the last 5 seconds for

RE: postgres operational

2019-01-09 Thread Scot Kreienkamp
The best way I came up with for older versions is:If timeout -s 9 10 psql -d DBNAME -c "select 1" >/dev/null ; then And on newer versions, use the pg_isready command. Scot Kreienkamp |Senior Systems Engineer | La-Z-Boy Corporate One La-Z-Boy Drive| Monroe, Michigan 48162 | Office: 734

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Rob Sargent
On 1/9/19 10:21 AM, github kran wrote: Thanks for your reply Rob. Reading the below documentation link says the EVENT trigger is only supported for DDL commands. Is it not correct ?. _1) https://www.postgresql.org/docs/9.6/event-trigger-definition.html _ (An event trigger fires whenever the ev

postgres operational

2019-01-09 Thread Steve Clark
Hi List, Is there a sure fire way to tell if postgres server is up an operational. I was testing to see if the socket at /tmp/.s.PGSQL.5432 existed - but I ran into a recent problem on CentOS 7.5, postgresql 9.2.24, where the socket was there but my script couldn't read from my database yet. Th

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Mark Fletcher
On Wed, Jan 9, 2019 at 9:02 AM github kran wrote: > >> Hi Postgres Team, >> >> I have an application using RDS Aurora Postgresql 9.6 version having 4 TB >> of DB size. In this DB we have a table PRODUCT_INFO with around 1 million >> rows and table size of 1 GB. >> We are looking for a implementa

Re: multiple configurations with repmgr

2019-01-09 Thread Martín Marqués
El 8/1/19 a las 13:17, ROS Didier escribió: > Hi > >    We are going to use repmgr  with one node for the > primary, one node for the standby and one node for the witness. > >    It works fine _with one project_. > >   > > The problem is  that we want to have several oth

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread github kran
Thanks for your reply Rob. Reading the below documentation link says the EVENT trigger is only supported for DDL commands. Is it not correct ?. *1) https://www.postgresql.org/docs/9.6/event-trigger-definition.html * (An event trig

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Ron
On 1/9/19 11:02 AM, github kran wrote: Hi Postgres Team, I have an application using RDS Aurora Postgresql 9.6 version having 4 TB of DB size. In this DB we have a table PRODUCT_INFO with around  1 million rows and table size of 1 GB. We are looking for a implementation whe

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread Rob Sargent
> On Jan 9, 2019, at 10:02 AM, github kran wrote: > > > Hi Postgres Team, > > I have an application using RDS Aurora Postgresql 9.6 version having 4 TB of > DB size. In this DB we have a table PRODUCT_INFO with around 1 million rows > and table size of 1 GB. > We are looking for a implemen

Re: Pulling data from Postgres DB table for every 5 seconds.

2019-01-09 Thread github kran
> > > Hi Postgres Team, > > I have an application using RDS Aurora Postgresql 9.6 version having 4 TB > of DB size. In this DB we have a table PRODUCT_INFO with around 1 million > rows and table size of 1 GB. > We are looking for a implementation where we want to pull the data in real > time for e

Re: (multiplatform) replication problem

2019-01-09 Thread Jeff Janes
On Tue, Jan 8, 2019 at 10:49 AM W.P. wrote: > Hi there, > I have following setup: > - master database, 9.5.7, on I386 (Pentium M), > now i want to replicate database to: > - slave database. 9.5.7 on armhf (OrangePiPC+). > Is in possible? > I think the error message is telling you that physical r