Re: [GENERAL] Validity of using the test_decoding plugin for production?

2016-11-01 Thread Michael Paquier
On Tue, Nov 1, 2016 at 12:57 AM, Joshua Kehn wrote: > I'm considering using the test_decoding[1] plugin in conjunction with > Amazon's recent update for RDS with PostgreSQL[2] which includes logical > replication support. The concern I currently have is the stability and > output format of the tes

[GENERAL] Postgres create database freezes - trying to run with replication

2016-11-01 Thread Adam Carrgilson
I am trying to create a highly available PostgreSQL database set-up using the Compose Governor project [https://github.com/compose/governor]. I have three Postgres servers and I want to ensure that full service remains when two out of three database servers remain online. Having these systems imme

[GENERAL] pgbench support dynamic identifier name

2016-11-01 Thread 德哥
HI, pgbench can support literal parameter now, so if need different pgbench client thread to support different table name. must use multi script , and set different name in the file. but ,if pgbench can support it , will much better like sysbench. for exp: ``` vi test.sql \set id ra

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Francisco Olarte
Hi: On Tue, Nov 1, 2016 at 3:01 AM, Patrick B wrote: > If I change recovery.conf: > recovery_target_time = '2016-10-30 02:24:40' > I get error: > FATAL: requested recovery stop point is before consistent recovery point It looks clear. When you take a base backup from a running system some recov

Re: [GENERAL] How to hint 2 coulms IS NOT DISTINCT FROM each other

2016-11-01 Thread Merlin Moncure
On Mon, Oct 31, 2016 at 9:28 AM, Kim Rose Carlsen wrote: > On Sat, Oct 29, 2016 at 8:27 AM, Kim Rose Carlsen wrote: > >> > I have tried creating a function called >> > zero_if_null(int) : int that just select COALESCE($1, 0) >> > and adding a index on (zero_if_null(customer_id)) on table that con

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Scott Marlowe
On Mon, Oct 31, 2016 at 8:01 PM, Patrick B wrote: > If I change recovery.conf: > > recovery_target_time = '2016-10-30 02:24:40' > > > I get error: > > FATAL: requested recovery stop point is before consistent recovery point You can try using pg_basebackup to get the replica setup. In 9.2 you got

[GENERAL] Statistics on index usage

2016-11-01 Thread François Battail
Dear List, does pgsql maintains statistics on index usage? I mean just a counter for each index in the database, incremented each time time it is used. It would be useful to help cleaning almost unused index and to avoid poisoning the global cache. I've found nothing so far but may be I've been m

Re: [GENERAL] Statistics on index usage

2016-11-01 Thread Scott Marlowe
On Tue, Nov 1, 2016 at 8:43 AM, François Battail wrote: > Dear List, > > does pgsql maintains statistics on index usage? I mean just a counter > for each index in the database, incremented each time time it is used. > It would be useful to help cleaning almost unused index and to avoid > poisoning

Re: [GENERAL] Statistics on index usage

2016-11-01 Thread Melvin Davidson
On Tue, Nov 1, 2016 at 10:43 AM, François Battail < francois.batt...@sipibox.fr> wrote: > Dear List, > > does pgsql maintains statistics on index usage? I mean just a counter > for each index in the database, incremented each time time it is used. > It would be useful to help cleaning almost unuse

Re: [GENERAL] Validity of using the test_decoding plugin for production?

2016-11-01 Thread Joshua Kehn
> On Tue, Nov 1, 2016, at 04:00 AM, Michael Paquier wrote: > How are you going to use it anyway? First deparse its output > and adapt it to your needs? That's the intention. Take the output of test_decoding, transform it into a reasonable object form, and feed that into an events stream for real-

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Patrick B
2016-11-02 2:55 GMT+13:00 Scott Marlowe : > On Mon, Oct 31, 2016 at 8:01 PM, Patrick B > wrote: > > If I change recovery.conf: > > > > recovery_target_time = '2016-10-30 02:24:40' > > > > > > I get error: > > > > FATAL: requested recovery stop point is before consistent recovery point > > You ca

Re: [GENERAL] Validity of using the test_decoding plugin for production?

2016-11-01 Thread Michael Paquier
On Wed, Nov 2, 2016 at 4:01 AM, Joshua Kehn wrote: > That's the intention. Take the output of test_decoding, transform it > into a reasonable object form, and feed that into an events stream for > real-time consumption. Hm... > The initial question was suitability of the test_decoding plugin, gi

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Patrick B
2016-11-02 8:43 GMT+13:00 Patrick B : > > > 2016-11-02 2:55 GMT+13:00 Scott Marlowe : > >> On Mon, Oct 31, 2016 at 8:01 PM, Patrick B >> wrote: >> > If I change recovery.conf: >> > >> > recovery_target_time = '2016-10-30 02:24:40' >> > >> > >> > I get error: >> > >> > FATAL: requested recovery s

[GENERAL] ENABLE ROW LEVEL SECURITY cause huge produce of checkpoints

2016-11-01 Thread david . turon
Hi, we tried new feature RLS - tested on postgres 9.5.3 / CentOS6. When we turn on ENABLE RLS + FORCE RLS on normal workload cause huge produce checkpoints (about 30x or more), our disk partition for xlog was full and log shipping to replica maybe delayed removing old checkpoints. Have anybody s

Re: [GENERAL] Turning slave into a master - PostgreSQL 9.2

2016-11-01 Thread Scott Marlowe
On Tue, Nov 1, 2016 at 1:43 PM, Patrick B wrote: > > > 2016-11-02 2:55 GMT+13:00 Scott Marlowe : >> >> On Mon, Oct 31, 2016 at 8:01 PM, Patrick B >> wrote: >> > If I change recovery.conf: >> > >> > recovery_target_time = '2016-10-30 02:24:40' >> > >> > >> > I get error: >> > >> > FATAL: requeste