Re: [GENERAL] upgrade to repmgr3

2016-08-15 Thread Pekka Rinne
hi 2016-08-04 16:19 GMT+03:00 Ian Barwick : > Hi > > On 08/04/2016 05:57 PM, Pekka Rinne wrote: > >> hi! >> >> I have been using postgres 9.4 and repmgr2.0 combination and been doing >> replication (hot standby). Now I'd like to start doing slot based >> replication and

Re: [GENERAL] Critical failure of standby

2016-08-15 Thread Sameer Kumar
On Tue, Aug 16, 2016 at 1:10 PM James Sewell wrote: > Hey, > > I understand that. > > But a hot standby should always be ready to promote (given it originally > caught up) right? > > I think it's a moot point really as some sort of corruption has been > introduced, the

Re: [GENERAL] Critical failure of standby

2016-08-15 Thread James Sewell
Hey, I understand that. But a hot standby should always be ready to promote (given it originally caught up) right? I think it's a moot point really as some sort of corruption has been introduced, the machines still won't wouldn't start after they could see the archive destination again.

Re: [GENERAL] C++ port of Postgres

2016-08-15 Thread Adam Brusselback
Just wondering what the end goal is for this project... Is it to just maintain an up to date Postgres fork that will compile with a C++ compiler? Is it to get a conversation going for a direction for Postgres itself to move? The former I don't see gaining much traction or doing all that much for

Re: [GENERAL] Critical failure of standby

2016-08-15 Thread John R Pierce
On 8/15/2016 7:23 PM, James Sewell wrote: Those are all good questions. Essentially this is a situation where DR is network separated from Prod - so I would expect the archive command to fail. I'll have to check the script it must not be passing the error back through to PostgreSQL. This

Re: [GENERAL] Critical failure of standby

2016-08-15 Thread James Sewell
Those are all good questions. Essentially this is a situation where DR is network separated from Prod - so I would expect the archive command to fail. I'll have to check the script it must not be passing the error back through to PostgreSQL. This still shouldn't cause database corruption though

Re: [GENERAL] pgbasebackup is failing after truncate

2016-08-15 Thread Michael Paquier
On Sat, Aug 13, 2016 at 12:41 AM, Jeff Janes wrote: > On Wed, Aug 10, 2016 at 11:06 PM, Yelai, Ramkumar > wrote: >> At present, I have some requirement to truncate the data base to reclaim >> disk space and at the same time I need to take

Re: [GENERAL] Looking for software to 'enqueue' connections

2016-08-15 Thread Adrian Klaver
On 08/15/2016 01:59 PM, Edmundo Robles wrote: Please do not top post: https://en.wikipedia.org/wiki/Posting_style The preferred style is bottom or interleaved as it makes the thread easier to follow Adrian i have hosted in a rackspace a Debian 7 with 2G RAM. I assume that would be one

Re: [GENERAL] Looking for software to 'enqueue' connections

2016-08-15 Thread Edmundo Robles
Adrian i have hosted in a rackspace a Debian 7 with 2G RAM. John, the table have 8 constraints and 5 indexes. Ilya thanks for the tip, i will search about OLTP. On Mon, Aug 15, 2016 at 3:47 PM, Ilya Kazakevich < ilya.kazakev...@jetbrains.com> wrote: > Hello. > > > > From: > >

Re: [GENERAL] Looking for software to 'enqueue' connections

2016-08-15 Thread Ilya Kazakevich
Hello. From: http://www.pgpool.net/ pgpool-II also has a limit on the maximum number of connections, but extra connections will be queued instead of returning an error immediately. But your configuration does not look optimal for me. Here are some things you may try: 1) Get rid

Re: [GENERAL] Looking for software to 'enqueue' connections

2016-08-15 Thread Adrian Klaver
On 08/15/2016 01:30 PM, Edmundo Robles wrote: Hi! I want find a software to 'enqueue' the client connections to database, so if i reach the max limit the query must be holding in a queue until one connection is released. I have many devices (100+) saving their state to a database, each

Re: [GENERAL] Looking for software to 'enqueue' connections

2016-08-15 Thread John R Pierce
On 8/15/2016 1:30 PM, Edmundo Robles wrote: I want find a software to 'enqueue' the client connections to database, so if i reach the max limit the query must be holding in a queue until one connection is released. pgbouncer is the correct answer, you may need to play about with the

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Melvin Davidson
On Mon, Aug 15, 2016 at 3:56 PM, Bruce Momjian wrote: > On Mon, Aug 15, 2016 at 12:18:04PM -0700, Adrian Klaver wrote: > > https://www.postgresql.org/docs/9.5/static/pgupgrade.html > > > > "Obviously, no one should be accessing the clusters during the upgrade. > > pg_upgrade

[GENERAL] Looking for software to 'enqueue' connections

2016-08-15 Thread Edmundo Robles
Hi! I want find a software to 'enqueue' the client connections to database, so if i reach the max limit the query must be holding in a queue until one connection is released. I have many devices (100+) saving their state to a database, each minute, but the table is too large more than

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Bruce Momjian
On Mon, Aug 15, 2016 at 12:18:04PM -0700, Adrian Klaver wrote: > https://www.postgresql.org/docs/9.5/static/pgupgrade.html > > "Obviously, no one should be accessing the clusters during the upgrade. > pg_upgrade defaults to running servers on port 50432 to avoid unintended > client connections.

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Adrian Klaver
On 08/15/2016 11:52 AM, Pete Fuller wrote: Same chips, same model Dell Poweredge actually. The process is pretty much the same between the local and offsite replicas, we have a home-brew script that runs an rsync from the master to the replica. On the local replica, it then takes the machine

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Pete Fuller
Same chips, same model Dell Poweredge actually. The process is pretty much the same between the local and offsite replicas, we have a home-brew script that runs an rsync from the master to the replica. On the local replica, it then takes the machine out of pacemaker standby, on the offsite

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Adrian Klaver
On 08/15/2016 08:04 AM, Pete Fuller wrote: We have not found any obvious differences, other than the size of the databases (~ 100 gig on the testing site vs 400 Gig in production). In fact, the upgrade path seems to work with our production db when testing on our offsite replica that lives in

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread rob stone
Hello, On Mon, 2016-08-15 at 08:45 -0700, Adrian Klaver wrote: > On 08/15/2016 08:04 AM, Pete Fuller wrote: > > > > We have not found any obvious differences, other than the size of > > the > > databases (~ 100 gig on the testing site vs 400 Gig in > > production).  In > > fact, the upgrade path

Re: [GENERAL] RowExclusiveLock timeout while autovacuum

2016-08-15 Thread Jeff Janes
On Sun, Aug 14, 2016 at 9:33 PM, zh1029 wrote: > Hi, > We are using PostgreSQL 9.3.11. We are observing DB update failed due to > lock timeout. failure because waiting for RowExclusiveLock. Autovacuum uses > plain vacuum which uses ShareUpdateExclusiveLock. right? > But from

Re: [GENERAL] Critical failure of standby

2016-08-15 Thread Jeff Janes
On Thu, Aug 11, 2016 at 10:39 PM, James Sewell wrote: > Hello, > > We recently experienced a critical failure when failing to a DR > environment. > > This is in the following environment: > > >- 3 x PostgreSQL machines in Prod in a sync replication cluster >- 3

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Adrian Klaver
On 08/15/2016 08:04 AM, Pete Fuller wrote: We have not found any obvious differences, other than the size of the databases (~ 100 gig on the testing site vs 400 Gig in production). In fact, the upgrade path seems to work with our production db when testing on our offsite replica that lives in

Re: [GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-15 Thread Adrian Klaver
On 08/15/2016 08:05 AM, Ioana Danes wrote: On Mon, Aug 15, 2016 at 10:52 AM, Adrian Klaver > wrote: They are not the same servers but they have similar setup. Fortunately they are qa and development.

Re: [GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-15 Thread Ioana Danes
On Mon, Aug 15, 2016 at 10:52 AM, Adrian Klaver wrote: > On 08/15/2016 07:40 AM, Ioana Danes wrote: > >> Hello Adrian, >> >> On Mon, Aug 15, 2016 at 10:00 AM, Adrian Klaver >> > wrote: >> >> On 08/15/2016

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Pete Fuller
We have not found any obvious differences, other than the size of the databases (~ 100 gig on the testing site vs 400 Gig in production). In fact, the upgrade path seems to work with our production db when testing on our offsite replica that lives in our backup datacenter, near identical

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Adrian Klaver
On 08/15/2016 07:40 AM, Pete Fuller wrote: Directories are correct. We do not utilize tablespaces. Anything obviously different in the setup between your production servers and the testing and development clusters? On Aug 15, 2016, at 10:06 AM, Adrian Klaver

Re: [GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-15 Thread Adrian Klaver
On 08/15/2016 07:40 AM, Ioana Danes wrote: Hello Adrian, On Mon, Aug 15, 2016 at 10:00 AM, Adrian Klaver > wrote: On 08/15/2016 06:48 AM, Ioana Danes wrote: Hello All, I am running postgres 9.4.8 on centos 7 and

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Pete Fuller
Directories are correct. We do not utilize tablespaces. > On Aug 15, 2016, at 10:06 AM, Adrian Klaver wrote: > > On 08/15/2016 06:20 AM, Pete Fuller wrote: >> Hello all, >> >> We are attempting to upgrade a production 9.2 postgres cluster to 9.5. The >> server

Re: [GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-15 Thread Ioana Danes
Hello Adrian, On Mon, Aug 15, 2016 at 10:00 AM, Adrian Klaver wrote: > On 08/15/2016 06:48 AM, Ioana Danes wrote: > >> Hello All, >> >> I am running postgres 9.4.8 on centos 7 and few days ago I started to >> get this error MultiXactId 32766 has not been created yet

Re: [GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Adrian Klaver
On 08/15/2016 06:20 AM, Pete Fuller wrote: Hello all, We are attempting to upgrade a production 9.2 postgres cluster to 9.5. The server is running Centos 7 with the Centos version - currently 9.2.15 We are installing the postgresql provided rpm of postgresql9.5 from the postgresql repo,

Re: [GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-15 Thread Adrian Klaver
On 08/15/2016 06:48 AM, Ioana Danes wrote: Hello All, I am running postgres 9.4.8 on centos 7 and few days ago I started to get this error MultiXactId 32766 has not been created yet -- apparent wraparound in 2 instances. 1. On one database server during the nightly task that does the "vacuum

[GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-15 Thread Ioana Danes
Hello All, I am running postgres 9.4.8 on centos 7 and few days ago I started to get this error MultiXactId 32766 has not been created yet -- apparent wraparound in 2 instances. 1. On one database server during the nightly task that does the "vacuum analyze". I upgraded to postgres 9.4.9 as

Re: [GENERAL] regexp_replace double quote

2016-08-15 Thread David G. Johnston
On Mon, Aug 15, 2016 at 9:27 AM, Михаил wrote: > Hi! > > I need to escape double quotes only: > test=# select regexp_replace('"""{Performer,"Boomwacker ""a"" > Recording""}"""', '([^"])"{2}([^"])', '\1\"\2', 'g'); > regexp_replace >

Re: [GENERAL] regexp_replace double quote

2016-08-15 Thread hubert depesz lubaczewski
On Mon, Aug 15, 2016 at 06:27:06PM +0500, Михаил wrote: > I need to escape double quotes only: > test=# select regexp_replace('"""{Performer,"Boomwacker ""a"" > Recording""}"""', '([^"])"{2}([^"])', '\1\"\2', 'g'); > regexp_replace >

[GENERAL] regexp_replace double quote

2016-08-15 Thread Михаил
Hi! I need to escape double quotes only: test=# select regexp_replace('"""{Performer,"Boomwacker ""a"" Recording""}"""', '([^"])"{2}([^"])', '\1\"\2', 'g'); regexp_replace - """{Performer,"Boomwacker \"a"" Recording\"}""" This is

[GENERAL] 9.2 to 9.5 pg_upgrade losing data

2016-08-15 Thread Pete Fuller
Hello all, We are attempting to upgrade a production 9.2 postgres cluster to 9.5. The server is running Centos 7 with the Centos version - currently 9.2.15 We are installing the postgresql provided rpm of postgresql9.5 from the postgresql repo, currently 9.5.4. In testing and on our