Re: [GENERAL] ShmemAlloc maximum size

2017-02-23 Thread Julien Rouhaud
On Thu, Feb 23, 2017 at 08:17:54PM +0530, hari.prasath wrote: > I am trying to get some 15MB of shared memory using ShmemAlloc. > > Cross checked all my kernal variables set in OS level and also in > postgresql.conf. > > Cant able to get the required memory(15MB) but if i try with some small

Re: [GENERAL] Postgres HA

2017-02-23 Thread Julyanto Sutandang
Dear Dylan, Talking about High Availability, we should understand the basic concept of HA, it is avoiding SPOF (Single Point of Failure). When we use a Loadbalancer (LTM) and that load balancer is single, then you may get HA only for the PostgreSQL but there are another single point of failure,

Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie

2017-02-23 Thread Adrian Klaver
On 02/23/2017 01:56 AM, Ertan Küçükoğlu wrote: Hello, I could not decide which forum is more appropriate. I end up posting my question here. For a small but important Project, I need to develop a GUI application on Raspberry Pi with PostgreSQL using Lazarus. PostgreSQL 9.4.10 server will be

Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie

2017-02-23 Thread Adrian Klaver
On 02/23/2017 06:08 AM, Ertan Küçükoğlu wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver Sent: Thursday, February 23, 2017 3:55 PM To: Ertan Küçükoğlu ;

Re: [GENERAL] Autovacuum stuck for hours, blocking queries

2017-02-23 Thread Merlin Moncure
On Wed, Feb 22, 2017 at 3:19 PM, Jeff Janes wrote: > On Mon, Feb 20, 2017 at 5:40 PM, Merlin Moncure wrote: >> On Thursday, February 16, 2017, Tom Lane wrote: >>> >>> Tim Bellis writes: >>> > Even though

Re: [GENERAL] Building PostgreSQL 9.6devel sources with Microsoft Visual C++ 2015?

2017-02-23 Thread Michael Paquier
On Thu, Feb 23, 2017 at 10:14 PM, Sandeep Thakkar wrote: > I see that the commit 0fb54de9aa4ffb792ea63af853146021ae501f12 adds support > to build with Visual Studio 2015. But, I tried building 9.6.2 and it returns > me the same error on Windows2012 R2. Is it only

Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie

2017-02-23 Thread Ertan Küçükoğlu
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver Sent: Thursday, February 23, 2017 3:55 PM To: Ertan Küçükoğlu ; pgsql-general@postgresql.org Subject: Re: [GENERAL] Latest

Re: [GENERAL] Building PostgreSQL 9.6devel sources with Microsoft Visual C++ 2015?

2017-02-23 Thread Sandeep Thakkar
Hi, I see that the commit *0fb54de9aa4ffb792ea63af853146021ae501f12* adds support to build with Visual Studio 2015. But, I tried building 9.6.2 and it returns me the same error on Windows2012 R2. Is it only me that is seeing the error? On Mon, Jan 4, 2016 at 8:42 PM, Tom Lane

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Leknín Řepánek
Maybe you can do something like WITH cte AS ( DELETE FROM t1 WHERE cond RETURNINIG * ) INSERT into t2 SELECT * FROM cte; To move rows between tables with combination with fdw_postgres and foreign table. Je; On Thu, Feb 23, 2017 at 10:33:27AM +0100, Francisco Olarte wrote: > Thomas: > > On

[GENERAL] Latest PostgreSQL on Raspbian Jessie

2017-02-23 Thread Ertan Küçükoğlu
Hello, I could not decide which forum is more appropriate. I end up posting my question here. For a small but important Project, I need to develop a GUI application on Raspberry Pi with PostgreSQL using Lazarus. PostgreSQL 9.4.10 server will be running on Raspberry Pi 3 Model B and another

Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie

2017-02-23 Thread Moreno Andreo
Il 23/02/2017 10:56, Ertan Küçükoğlu ha scritto: I would like to know; 1- Is it possible to install 9.6.2 with same version pglib on Raspberry Pi? In subject you call it as Raspbian Jessie, so I assume it's somewhat related to Debian Jessie. Debian repository does not (at last, not in the last

Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie

2017-02-23 Thread Adrian Klaver
On 02/23/2017 02:57 AM, Moreno Andreo wrote: > Il 23/02/2017 10:56, Ertan Küçükoğlu ha scritto: >> I would like to know; >> 1- Is it possible to install 9.6.2 with same version pglib on >> Raspberry Pi? > In subject you call it as Raspbian Jessie, so I assume it's somewhat > related to Debian

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Francisco Olarte
Thomas: On Wed, Feb 22, 2017 at 1:51 PM, Thomas Güttler wrote: > I want to **move** the data. The data should get deleted on the satellite > after transfer. > I don't know how to delete the data which was copied, since inserts can > happen during the copy statement.

Re: [GENERAL] Autovacuum stuck for hours, blocking queries

2017-02-23 Thread Bill Moran
On Wed, 22 Feb 2017 13:19:11 -0800 Jeff Janes wrote: > On Mon, Feb 20, 2017 at 5:40 PM, Merlin Moncure wrote: > > > > On Thursday, February 16, 2017, Tom Lane wrote: > > > >> Tim Bellis writes: > >> >

Re: [GENERAL] ShmemAlloc maximum size

2017-02-23 Thread hari.prasath
Tried in 9.5 and 9.6 version if postgresql. OS: mac sierra 16gb RAMcheers- Harry On Thu, 23 Feb 2017 20:27:58 +0530 Melvin Davidson wrote On Thu, Feb 23, 2017 at 9:47 AM, hari.prasath wrote:I am trying to

Re: [GENERAL] NOTIFY command impact

2017-02-23 Thread Benoit Lobréau
Hi ! Indeed :) Thanks for taking the time to explain ! Benoit.

[GENERAL] Foreign key references a unique index instead of a primary key

2017-02-23 Thread Ivan Voras
Hello, I've inherited a situation where: - a table has both a primary key and a unique index on the same field. - at some time, a foreign key was added which references this table (actually, I'm not sure about the sequence of events), which has ended up referencing the unique index

Re: [GENERAL] NOTIFY command impact

2017-02-23 Thread Rob Brucks
Hi Benoit, Your SQL works fine as long as there are never any communication problems between the master and slave. But if your slave loses communication with the master, then the SQL you provided will not report any lag despite the potential that the slave could be very far behind the master.

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Francisco Olarte
Thomas: On Thu, Feb 23, 2017 at 4:16 PM, Thomas Güttler wrote: > Am 22.02.2017 um 16:00 schrieb Adrian Klaver: >> only written on a successful transfer. To improve the chances of >> successful transfer more smaller transfer batches >> rather then larger transfers.

[GENERAL] ShmemAlloc maximum size

2017-02-23 Thread hari.prasath
I am trying to get some 15MB of shared memory using ShmemAlloc. Cross checked all my kernal variables set in OS level and also in postgresql.conf. Cant able to get the required memory(15MB) but if i try with some small memory(1MB), its working fine. Am i missing something.? cheers

Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie - solved

2017-02-23 Thread Ertan Küçükoğlu
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Thursday, February 23, 2017 5:25 PM To: Ertan Küçükoğlu ; pgsql-general@postgresql.org Subject: Re: [GENERAL] Latest PostgreSQL on Raspbian Jessie On 02/23/2017 06:08 AM, Ertan

Re: [GENERAL] Foreign key references a unique index instead of a primary key

2017-02-23 Thread Adrian Klaver
On 02/23/2017 03:40 AM, Ivan Voras wrote: > Hello, > > I've inherited a situation where: > > * a table has both a primary key and a unique index on the same field. > * at some time, a foreign key was added which references this table > (actually, I'm not sure about the sequence of

Re: [GENERAL] NOTIFY command impact

2017-02-23 Thread Benoit Lobréau
Hi, I might have missed something. This should be enough to solve the problem no ? SELECT CASE WHEN pg_last_xlog_receive_location() = pg_last_xlog_replay_location() THEN 0 ELSE EXTRACT (EPOCH FROM now() - pg_last_xact_replay_timestamp())::INTEGER END AS replication_lag; Benoit.

Re: [GENERAL] ShmemAlloc maximum size

2017-02-23 Thread Melvin Davidson
On Thu, Feb 23, 2017 at 9:47 AM, hari.prasath wrote: > I am trying to get some 15MB of shared memory using *ShmemAlloc. * > > Cross checked all my kernal variables set in OS level and also in > postgresql.conf. > > Cant able to get the required memory(15MB) but if i

Re: [GENERAL] Autovacuum stuck for hours, blocking queries

2017-02-23 Thread Jeff Janes
On Thu, Feb 23, 2017 at 2:42 AM, Bill Moran wrote: > On Wed, 22 Feb 2017 13:19:11 -0800 > Jeff Janes wrote: > > > On Mon, Feb 20, 2017 at 5:40 PM, Merlin Moncure > wrote: > > > > > > On Thursday, February 16, 2017, Tom Lane

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Thomas Güttler
Am 22.02.2017 um 16:00 schrieb Adrian Klaver: On 02/22/2017 04:51 AM, Thomas Güttler wrote: I have other concerns: atomar transaction. Movement should happen completely or not all. I don't think you can do this reliable (atomic transaction) with "copy table_name". You can if you wrap it in

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Thomas Güttler
Am 23.02.2017 um 10:33 schrieb Francisco Olarte: Thomas: On Wed, Feb 22, 2017 at 1:51 PM, Thomas Güttler wrote: I want to **move** the data. The data should get deleted on the satellite after transfer. I don't know how to delete the data which was copied, since

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Thomas Güttler
Am 23.02.2017 um 13:44 schrieb Leknín Řepánek: Maybe you can do something like WITH cte AS ( DELETE FROM t1 WHERE cond RETURNINIG * ) INSERT into t2 SELECT * FROM cte; To move rows between tables with combination with fdw_postgres and foreign table. ... this way you don't need the second

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Francisco Olarte
Thomas: On Thu, Feb 23, 2017 at 4:26 PM, Thomas Güttler wrote: > Am 23.02.2017 um 13:44 schrieb Leknín Řepánek: >> Maybe you can do something like >> WITH cte AS ( >> DELETE FROM t1 WHERE cond >> RETURNINIG * >> ) >> INSERT into t2 >> SELECT * FROM cte; >> >> To

Re: [GENERAL] Move rows from one database to other

2017-02-23 Thread Francisco Olarte
Thomas: On Thu, Feb 23, 2017 at 4:25 PM, Thomas Güttler wrote: > This sound good. Is there a name for this trick, to find more details? Not that I know of. It's really old, basic stuff, with many variations possible. I've being doing variation of it since the

Re: [GENERAL] Building PostgreSQL 9.6devel sources with Microsoft Visual C++ 2015?

2017-02-23 Thread Sandeep Thakkar
On Thu, Feb 23, 2017 at 7:03 PM, Michael Paquier wrote: > On Thu, Feb 23, 2017 at 10:14 PM, Sandeep Thakkar > wrote: > > I see that the commit 0fb54de9aa4ffb792ea63af853146021ae501f12 adds > support > > to build with Visual Studio

Re: [GENERAL] Postgres HA

2017-02-23 Thread Jehan-Guillaume de Rorthais
On Wed, 22 Feb 2017 22:58:10 + Dylan Luong wrote: > Hi > > I am a DBA at the University of South Australia. For PostgreSQL High > Availability, we currently have setup a Master/Slave across two datacenters > using PostgreSQL (WAL) streaming replication. We use an

Re: [GENERAL] Postgres HA

2017-02-23 Thread dinesh kumar
Hi Dylan, On Thu, Feb 23, 2017 at 4:28 AM, Dylan Luong wrote: > Hi > > > > I am a DBA at the University of South Australia. For PostgreSQL High > Availability, we currently have setup a Master/Slave across two datacenters > using PostgreSQL (WAL) streaming replication.