[GENERAL] problem

2017-09-19 Thread Alex Samad
Hi I setup a sync rep cluster 9.6 unfortunately I have made a bit of an issue for myself. my backup site is full on the data partition, which i believe has lead for my write site to be full on the pg_xlog partition - i believe that it is holding logs to replicate and can't any more. so now neit

Re: [GENERAL] Begginers question

2017-08-17 Thread Alex Samad
On 16 August 2017 at 20:55, Achilleas Mantzios wrote: > On 16/08/2017 13:46, Alex Samad wrote: > > > > On 16 August 2017 at 16:16, Michael Paquier > wrote: > >> On Wed, Aug 16, 2017 at 2:32 PM, Alex Samad wrote: >> > 1) why did it fill up this tim

Re: [GENERAL] cluster question

2017-08-16 Thread Alex Samad
On 17 August 2017 at 10:51, Ian Barwick wrote: > On 08/16/2017 02:41 PM, Alex Samad wrote: > (...) > > > > okay think I have it setup, but when i do a switch over it gets stuck > here. > > > > > > > > NOTICE: STANDBY PROMOTE successful > &g

Re: [GENERAL] Begginers question

2017-08-16 Thread Alex Samad
Great I will add it to my notes. Thanks On 16 August 2017 at 20:55, Achilleas Mantzios wrote: > On 16/08/2017 13:46, Alex Samad wrote: > > > > On 16 August 2017 at 16:16, Michael Paquier > wrote: > >> On Wed, Aug 16, 2017 at 2:32 PM, Alex Samad wrote: >> >

Re: [GENERAL] Begginers question

2017-08-16 Thread Alex Samad
On 16 August 2017 at 16:16, Michael Paquier wrote: > On Wed, Aug 16, 2017 at 2:32 PM, Alex Samad wrote: > > 1) why did it fill up this time and not previously > > I add this > > archive_command = '/bin/true' > > wal_keep_segments = 1000 # <<< I&

Re: [GENERAL] cluster question

2017-08-15 Thread Alex Samad
On 15 August 2017 at 16:35, Andreas Kretschmer wrote: > > > Am 15.08.2017 um 05:15 schrieb Alex Samad: > >> Hi >> >> Quick question. I have a 2 node cluster - each node has its own ip. >> >> But from reading this, I really need a 3rd ip, which potent

[GENERAL] Begginers question

2017-08-15 Thread Alex Samad
Hi So I have been playing with an streaming cluster. I have the replication working I believe. But whilst attempting to do an import of my original DB, I filled up my disk pg_xlog directory. Strangley I have tried this before and not filled this up. so 1) why did it fill up this time and not p

Re: [GENERAL] cluster question

2017-08-14 Thread Alex Samad
wrote: > On 14 August 2017 08:39:54 GMT+02:00, Alex Samad > wrote: > >Hi > > > >I have setup a streaming replicating cluster, with a hot standby. > > > >Now I would like to change the RW to hot standby and change the hot > >standby > >to be the R

[GENERAL] cluster question

2017-08-13 Thread Alex Samad
Hi I have setup a streaming replicating cluster, with a hot standby. Now I would like to change the RW to hot standby and change the hot standby to be the RW server. Is it just a matter of updating recover.conf file ? Alex

Re: [GENERAL] Question about loading up a table

2017-08-02 Thread Alex Samad
On 3 August 2017 at 02:11, Scott Marlowe wrote: > On Tue, Aug 1, 2017 at 4:27 PM, Alex Samad wrote: > > Hi > > > > So just to go over what i have > > > > > > server A (this is the original pgsql server 9.2) > > > > Server X and Server Y ... PGS

Re: [GENERAL] Question about loading up a table

2017-08-01 Thread Alex Samad
ks to server X, could I load this up in PGSQL and do a table to table copy - i presume this would be faster ... is this possible ? how do I get around the same DB name ? What other solutions do I have ? Alex On 1 August 2017 at 23:24, Scott Marlowe wrote: > On Mon, Jul 31, 2017 at 11:16

Re: [GENERAL] Question about loading up a table

2017-07-31 Thread Alex Samad
Hi I double checked and there is data going over, thought I would correct that. But it seems to be very slow. Having said that how do I / what tools do I use to check through put A On 1 August 2017 at 08:56, Alex Samad wrote: > Hi > > I'm using pg_dump 9.6 to do the dumps

Re: [GENERAL] partitioning question

2017-07-31 Thread Alex Samad
Sun, Jul 30, 2017 at 7:13 PM, Alex Samad wrote: > > How expensive is dynamic over static. I'm looking at storing yearly > now, so > > I figure if my if then clause has the latest year at the top it should be > > very quick. > > Assuming you're not doing anythin

Re: [GENERAL] Question about loading up a table

2017-07-31 Thread Alex Samad
to a new single table so constraint shouldn't be a problem. Guess I have to just let it rung to completion Thanks On 1 August 2017 at 06:59, Scott Marlowe wrote: > On Mon, Jul 31, 2017 at 2:31 AM, vinny wrote: > > On 2017-07-31 11:02, Alex Samad wrote: > >> > >

[GENERAL] Question about loading up a table

2017-07-31 Thread Alex Samad
Hi I am using pg_dump | psql to transfer data from my old 9.2 psql into a 9.6 psql. The new DB server is setup as master replicating to a hot standby server. What I have noticed is that the rows don't get replicated over until the copy from stdin is finished... hard to test when you have M+ line

Re: [GENERAL] vacuum on streaming replication

2017-07-31 Thread Alex Samad
Thanks On 31 July 2017 at 18:11, Chris Travers wrote: > > > On Mon, Jul 31, 2017 at 10:08 AM, Michael Paquier < > michael.paqu...@gmail.com> wrote: > >> On Mon, Jul 31, 2017 at 7:28 AM, Andreas Kretschmer >> wrote: >> > The standby is read only, vacuum runs on the master and replicated to >> th

[GENERAL] vacuum on streaming replication

2017-07-30 Thread Alex Samad
Hi setup a cluster, with streaming replication and hot stand by the idea is to use the stand by to do queries whilst the primary is doing inserts. But I noticed the stats on the stand by server don't update, nor can I run vacuum against it as its in recovery mode. So how do update the stats and

Re: [GENERAL] partitioning question

2017-07-30 Thread Alex Samad
How expensive is dynamic over static. I'm looking at storing yearly now, so I figure if my if then clause has the latest year at the top it should be very quick. On 31 July 2017 at 11:07, Justin Pryzby wrote: > On Mon, Jul 31, 2017 at 10:25:54AM +1000, Alex Samad wrote: > > I

Re: [GENERAL] partitioning question

2017-07-30 Thread Alex Samad
2017 at 09:15:29AM +1000, Alex Samad wrote: > > Hi > > > > I was about to partition a large (?) approx 3T of data 2B rows into > > partition tables but broken up into MM ... > > > > Now I have been reading about limiting the number of partitions otherw

[GENERAL] partitioning question

2017-07-30 Thread Alex Samad
Hi I was about to partition a large (?) approx 3T of data 2B rows into partition tables but broken up into MM ... Now I have been reading about limiting the number of partitions otherwise it could slow down the parser. My reasoning for limiting to MM was that most of the request would be

Re: [GENERAL] Question about paritioning

2017-07-27 Thread Alex Samad
now for the insert, do I create / update this monthly have had a 2 or 3 level if then check before inserting or do I create a programatic insert that works out the table name On 27 July 2017 at 18:36, John R Pierce wrote: > On 7/27/2017 12:43 AM, Alex Samad wrote: > >> >> ... as l

Re: [GENERAL] Question about paritioning

2017-07-27 Thread Alex Samad
ote: > On 7/26/2017 10:08 PM, Alex Samad wrote: > >> I have a large table about 3B rows, that I would like to partition on a >> column called _received which is of type timestamp >> >> > a good goal is to have no more than about 100 partitions max, and ideally &g

[GENERAL] Question about paritioning

2017-07-26 Thread Alex Samad
Hi I have a large table about 3B rows, that I would like to partition on a column called _received which is of type timestamp I followed this https://medium.com/@StreamBright/creating-partitions-automatically-in-postgresql-7006d68c0fbb and came up with CREATE OR REPLACE FUNCTION create_partiti