[GENERAL] Strange avg value size for index on expression in pg_stats

2014-11-10 Thread Jehan-Guillaume de Rorthais
Hello, I'm not sure if I should post here or on pgsql-hackers. While investigating about a wrong result with my btree bloat estimation query, I found a strange stat deviation between the average size of a value in its table and its average size in one index on the lower expression. Take the

Re: [GENERAL] Strange avg value size for index on expression in pg_stats

2014-11-10 Thread Jehan-Guillaume de Rorthais
On Mon, 10 Nov 2014 11:52:54 +0100 Jehan-Guillaume de Rorthais iog...@free.fr wrote: Hello, I'm not sure if I should post here or on pgsql-hackers. While investigating about a wrong result with my btree bloat estimation query, I found a strange stat deviation between the average size

Re: [GENERAL] Strange avg value size for index on expression in pg_stats

2014-11-10 Thread Jehan-Guillaume de Rorthais
On Mon, 10 Nov 2014 09:39:23 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Jehan-Guillaume de Rorthais iog...@free.fr writes: While investigating about a wrong result with my btree bloat estimation query, I found a strange stat deviation between the average size of a value in its table and its

Re: [GENERAL] Protect a table against concurrent data changes while allowing to vacuum it

2016-06-22 Thread Jehan-Guillaume de Rorthais
Le Wed, 22 Jun 2016 10:49:13 +, Albe Laurenz a écrit : > Sameer Kumar wrote: > > On Wed, Jun 22, 2016 at 6:08 PM Vlad Arkhipov wrote: > >> I am running PostgreSQL 9.5. > >> > >> CREATE TABLE t (id BIGINT NOT NULL PRIMARY KEY, name TEXT); > >>

Re: [GENERAL] Protect a table against concurrent data changes while allowing to vacuum it

2016-06-22 Thread Jehan-Guillaume de Rorthais
Le Wed, 22 Jun 2016 18:07:46 +0800, Vlad Arkhipov a écrit : > I am running PostgreSQL 9.5. > > CREATE TABLE t (id BIGINT NOT NULL PRIMARY KEY, name TEXT); I guess this is not your definitive definition of the table and you might have some other fields isn't it ? I can

Re: [GENERAL] Auotmated postgres failover

2016-01-22 Thread Jehan-Guillaume de Rorthais
gsql-resource-agent/blob/master/multistate/docs/Quick_Start.md > repmgr is a tool you could use in conjunction with a generic cluster > management system like linuxha/heartbeat, vcs, etc. > > the most difficult part is reliably determining that A) the master has > crashed, and B) fen

Re: [GENERAL] Script to check replication

2016-03-09 Thread Jehan-Guillaume de Rorthais
Le Fri, 4 Mar 2016 19:35:16 +, Ashish Chauhan a écrit : > Hi, > > We are running Streaming replication with Hot standby in our current > production. I do have below script to check replication status and > replication lag. Does anyone have script which runs every

Re: [GENERAL] Unique values on multiple tables

2016-03-28 Thread Jehan-Guillaume de Rorthais
Le Mon, 28 Mar 2016 12:44:51 +0200, Emre Hasegeli a écrit : > > Could I use lock tables to fix this? Is postgres automaticaly locking a > > table while running a trigger on that table? > > You can use LOCK TABLE. See the documentation: > >

Re: [GENERAL] pgbouncer increase pool_size, reload does not work

2017-02-02 Thread Jehan-Guillaume de Rorthais
On Thu, 2 Feb 2017 04:27:45 -0700 (MST) alexanderfelipewo wrote: > hello! > > i have a question for pgbouncer in case someone has faced this and there is > a solution available. > > i have a db with pgbouncer where the pool_size is set to 50 (i ve noticed > this

Re: [GENERAL] pgbouncer increase pool_size, reload does not work

2017-02-03 Thread Jehan-Guillaume de Rorthais
On Thu, 2 Feb 2017 16:12:06 -0800 Adrian Klaver wrote: > On 02/02/2017 03:27 AM, alexanderfelipewo wrote: > > hello! > > > > i have a question for pgbouncer in case someone has faced this and there is > > a solution available. > > > > i have a db with pgbouncer where

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] clarification about standby promotion

2017-02-09 Thread Jehan-Guillaume de Rorthais
master to the LSN the slave received. in PAF[1], this check is: * shut down the master * use pg_controldata to find its shutdown checkpoint * force a checkpoint on the standby (which in theory received everything from the master by streaming) * using pg_dumpxlog, check you rece

Re: [GENERAL] clarification about standby promotion

2017-02-10 Thread Jehan-Guillaume de Rorthais
On Thu, 9 Feb 2017 18:27:30 + Rakesh Kumar wrote: > >Sure, but when you are doing a switchover, the standby is supposed to be > >connected to the master when you shutdown the master. So based on the doc, > >the standby should receive **everything** from the master

Re: [GENERAL] PGDATA / data_directory

2016-09-07 Thread Jehan-Guillaume de Rorthais
On Sun, 4 Sep 2016 11:40:38 +0200 Christoph Berg wrote: > Re: Benoit Lobréau 2016-08-31 >

Re: [GENERAL] Monitor pg_xlog size via SQL with postgres 9.4

2016-09-22 Thread Jehan-Guillaume de Rorthais
On Thu, 22 Sep 2016 14:23:20 +0200 Sylvain Marechal wrote: > Hello all, > > is there a way to monitor the size of the pg_xlog directory in SQL? The > goal is to monitor the pg_xlog file without ressorting to a 'du' like > solution that needs a direct access to the

Re: [GENERAL] Any work on better parallelization of pg_dump?

2016-08-29 Thread Jehan-Guillaume de Rorthais
On Mon, 29 Aug 2016 13:38:03 +0200 hubert depesz lubaczewski wrote: > Hi, > we have rather uncommon case - DB with ~ 50GB of data, but this is > spread across ~ 8 tables. > > Running pg_dump -Fd -jxx dumps in parallel, but only data, and MOST of > the time is spent on

Re: [GENERAL] Any work on better parallelization of pg_dump?

2016-08-29 Thread Jehan-Guillaume de Rorthais
On Mon, 29 Aug 2016 13:13:17 -0300 Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Jehan-Guillaume de Rorthais wrote: > > On Mon, 29 Aug 2016 13:38:03 +0200 > > hubert depesz lubaczewski <dep...@depesz.com> wrote: > > > > > Hi, > > > we

Re: [GENERAL] Fast Primary shutdown only after wal_sender_timeout

2016-10-28 Thread Jehan-Guillaume de Rorthais
Le 28 octobre 2016 12:40:24 GMT+02:00, Michael Banck a écrit : >Hi, > >I'm doing some failover tests on a 2-node streaming replication cluster >and shutting down the primary with 'pg_ctl -m fast' results in a >timeout >of 50-60 seconds, pg_ctl returns only after the

Re: [GENERAL] Streaming replication failover/failback

2016-11-17 Thread Jehan-Guillaume de Rorthais
On Wed, 16 Nov 2016 15:51:26 -0900 Israel Brewster wrote: > I've been playing around with streaming replication, and discovered that the > following series of steps *appears* to work without complaint: > > - Start with master on server A, slave on server B, replicating

Re: [GENERAL] Streaming replication failover/failback

2016-11-18 Thread Jehan-Guillaume de Rorthais
r the WAL files on B to go out for scope for A in the time > > it takes you to do the switch over. > > Yeah, not very - this was just in testing, so essentially no activity. So > between your response and the one from Jehan-Guillaume de Rorthais, what I'm > hearing is that m

Re: [GENERAL] PostgreSQl HA solution

2016-11-30 Thread Jehan-Guillaume de Rorthais
On Wed, 30 Nov 2016 15:00:16 +0100 (CET) Marcin Giedz wrote: > Hello, > > Does anyone know any reliable open source HA solution with stream replication > and IP live migration in case of master node failure? Recently I've been > attending Fujitsu PostgreSQL webinar and

Re: [GENERAL] PostgreSQl HA solution

2016-11-30 Thread Jehan-Guillaume de Rorthais
On Wed, 30 Nov 2016 08:58:13 -0800 "Joshua D. Drake" wrote: > On 11/30/2016 06:00 AM, Marcin Giedz wrote: > > Hello, > > > > Does anyone know any reliable open source HA solution with stream > > replication and IP live migration in case of master node failure? > >

Re: [GENERAL] [GENERAL] Replication between différent versions of the same OS.

2016-12-01 Thread Jehan-Guillaume de Rorthais
On Thu, 1 Dec 2016 20:11:06 +0100 Benoit Lobréau wrote: > Hi, > > Is it possible to use the built in replication to replicate between two > PostgreSQL in the same version but in different version of the same OS (Say > Pg 9.1 Ubuntu 12 to Pg 9.1 Ubuntu 14) > > I think

Re: [GENERAL] looking for a globally unique row ID

2017-09-16 Thread Jehan-Guillaume de Rorthais
Le 14 septembre 2017 19:11:19 GMT+02:00, Rafal Pietrak a écrit : > > >W dniu 14.09.2017 o 15:54, Merlin Moncure pisze: >> On Thu, Sep 14, 2017 at 2:45 AM, Rafal Pietrak >wrote: >>> Hello everybody, >>> >>> Can anybody help me find a way to implement an ID