Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Venkata B Nagothi
On Wed, Aug 17, 2016 at 1:31 PM, Sameer Kumar wrote: > > > On Wed, Aug 17, 2016 at 10:34 AM Patrick B > wrote: > >> Hi guys, >> >> I'm using PostgreSQL 9.2 and I got one master and one slave with >> streaming replication. >> >> Currently, I got a backup script that runs daily from the master, it

Re: [GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Venkata B Nagothi
On Tue, Aug 16, 2016 at 6:38 PM, Chris Withers wrote: > Hi All, > > What would be the best schema to use when looking to implement an event > stream with tagging and filtering? > > An event is a row with a primary key along the lines of (colo, host, > category) and an associated set of tags, wher

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Venkata B Nagothi
On Wed, Aug 17, 2016 at 2:09 PM, Sameer Kumar wrote: > > > On Wed, Aug 17, 2016 at 12:00 PM Venkata B Nagothi > wrote: > >> On Wed, Aug 17, 2016 at 1:31 PM, Sameer Kumar >> wrote: >> >>> >>> >>> On Wed, Aug 17, 2016 at 10:34 AM

Re: [GENERAL] Question about performance - Postgres 9.5

2016-08-16 Thread Venkata B Nagothi
On Mon, Jun 13, 2016 at 8:37 AM, Patrick B wrote: > Hi guys, > > In the db I'm working one, it will be three tables: > > visits, work, others. > > Everything the customer do, will be logged. All inserts/updates/deletes > will be logged. > > Option 1: Each table would have its own log table. > vis

Re: [GENERAL] Queries on async replicas locked each other after index rename on master

2016-08-30 Thread Venkata B Nagothi
On Wed, Aug 31, 2016 at 8:07 AM, Chinh Nguyen wrote: > Hello All, > > We recently tried to reindex on a heavy used database cluster (master > + multiple hot-standby async replicas, all taking traffic) and > replicas were effectively blocked for 10 minutes resulting in drop of > a lot of read traf

Re: [GENERAL] Vacuum Full - Questions

2016-08-31 Thread Venkata B Nagothi
On Thu, Sep 1, 2016 at 8:41 AM, Patrick B wrote: > Hi guys, > > A dev has ran a VACUUM FULL command into our test database running > PostgreSQL 9.5 (I know... goddamn)... > > ... after the Vacuum Full, some queries start using SEQ scans instead of > indexes... > > Does that happen because of

Re: [GENERAL] Vacuum Full - Questions

2016-08-31 Thread Venkata B Nagothi
On Thu, Sep 1, 2016 at 10:32 AM, Patrick B wrote: > > > 2016-09-01 11:53 GMT+12:00 Venkata B Nagothi : > >> >> On Thu, Sep 1, 2016 at 8:41 AM, Patrick B >> wrote: >> >>> Hi guys, >>> >>> A dev has ran a VACUUM FULL command into

Re: [GENERAL] 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2

2016-09-01 Thread Venkata B Nagothi
On Fri, Sep 2, 2016 at 12:48 PM, Patrick B wrote: > Hi guys, > > I'll be performing a migration on my production master database server, > which is running PostgreSQL 9.2 atm, from SATA disks to SSD disks. > I've got some questions about it, and it would be nice if u guys could > share your exper

Re: [GENERAL] 2.5TB Migration from SATA to SSD disks - PostgreSQL 9.2

2016-09-02 Thread Venkata B Nagothi
On Fri, Sep 2, 2016 at 2:40 PM, Patrick B wrote: > > > 2016-09-02 15:36 GMT+12:00 Venkata B Nagothi : > >> >> On Fri, Sep 2, 2016 at 12:48 PM, Patrick B >> wrote: >> >>> Hi guys, >>> >>> I'll be performing a migration on my pr

Re: [GENERAL] How to reduce WAL files in Point in time recovery

2016-09-02 Thread Venkata B Nagothi
On Fri, Sep 2, 2016 at 2:58 PM, Amee Sankhesara - Quipment India < amee.sankhes...@quipment.nl> wrote: > Hi, > > > > I have setup PITR in PostgreSQL. I am taking base backup at every specific > interval and also kept WAL files of size 16 MB each. > > > > Now the situation is that even there is no

Re: [GENERAL] Postgres UPGRADE from 9.2 to 9.4

2016-09-06 Thread Venkata B Nagothi
On Wed, Sep 7, 2016 at 10:43 AM, Patrick B wrote: > >> how large is the full database cluster? >> >> if its only a few GB or whatever, and not grossly complex, pg_dumpall -h >> oldhost | psql -h newhost, is the simplest way to move a complete set of >> databases from an old server to a new. if th

Re: [GENERAL] Setup pgpool-II with streaming replication

2016-09-07 Thread Venkata B Nagothi
I gone through below articles but some or other way require DB server > restart which is not possible in our case. Could you please provide some > documentation or steps how to achive connection pooling without any > downtime? > DB server restart ? Why do you think you need to restart the database

Re: [GENERAL] Setup pgpool-II with streaming replication

2016-09-08 Thread Venkata B Nagothi
On Fri, Sep 9, 2016 at 3:14 AM, Ashish Chauhan wrote: > Thanks Venkata for your reply. > > > > Currently, we have two Postgres server with master-slave streaming > replication. All application servers are directly pointing to master server > only. I am planning to setup new server for PgPool, at

Re: [GENERAL] large number dead tup - Postgres 9.5

2016-09-11 Thread Venkata B Nagothi
On Mon, Sep 12, 2016 at 9:17 AM, Patrick B wrote: > Hi guys, > > select schemaname,relname,n_live_tup, n_dead_tup from pg_stat_all_tables > where relname = 'parts'; > > > schemaname relname n_live_tup n_dead_tup >> -- - -- -- >> public parts 191623953

Re: [GENERAL] FATAL: could not receive data from WAL stream

2016-09-19 Thread Venkata B Nagothi
On Tue, Sep 20, 2016 at 12:38 PM, Patrick B wrote: > Hi guys, > > I got a slave server running Postgres 9.2 with streaming replication and > wal_archive in an EC2 Instance at Amazon. > > Postgres logs are showing me this error: > >> restored log file "0002179A00F8" from archive >> inv

Re: [GENERAL] We have a requirement to downgrade from PostgreSQL 9.5.4 to 9.5.2

2016-09-19 Thread Venkata B Nagothi
> We are currently running at 9.5.2 and plan to upgrade to 9.5.4, but our > change requirement needs to plan for a downgrade with data preservation, > before upgrade is authorized. > > Thus, I am asking this: Is it safe to downgrade from 9.5.4 to 9.5.2 by > simply replacing the binaries? We will ke

Re: [GENERAL] Extract date from a TIMESTAMP(6) WITHOUT TIME ZONE NOT NULL column

2016-09-21 Thread Venkata B Nagothi
On Thu, Sep 22, 2016 at 1:37 PM, Patrick B wrote: > Hi guys, > > I'm using postgres 9.2 and got the following column: > > start TIMESTAMP(6) WITHOUT TIME ZONE NOT NULL > > > SELECT start FROM test1; > > > 2015-12-18 02:40:00 > > I need to split that date into two columns on my select: > > 2015-1

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-29 Thread Venkata B Nagothi
On Fri, Sep 30, 2016 at 5:18 AM, Rakesh Kumar wrote: > > Hi > > I would like to know which technique is better for supporting > multi-tenancy= > applications, going upto hundreds or even thousands of tenants. > > 1 - One database with difference schemas (one schema per tenant) > or > 2 - One dat

Re: [GENERAL] Multi tenancy : schema vs databases

2016-09-29 Thread Venkata B Nagothi
On Fri, Sep 30, 2016 at 10:16 AM, Rakesh Kumar wrote: > > > > From: Venkata B Nagothi > Sent: Thursday, September 29, 2016 17:25 > To: Rakesh Kumar > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Multi tenancy : schema

Re: [GENERAL] Checking Postgres Streaming replication delay

2016-10-30 Thread Venkata B Nagothi
On Mon, Oct 31, 2016 at 11:57 AM, Patrick B wrote: > Hi guys, > > I'm using this query to measure the delay between a Master and a Streaming > Replication Slave server, using PostgreSQL 9.2. > > SELECT >> pg_last_xlog_receive_location() receive, >> pg_last_xlog_replay_location() replay, >> ( >> e

Re: [GENERAL] replication setup: advice needed

2016-11-04 Thread Venkata B Nagothi
On Thu, Nov 3, 2016 at 8:17 PM, Dmitry Karasik wrote: > Dear all, > > I'd like to ask for help or advice with choosing the best replication > setup for > my task. > > I need to listen to continuous inserts/deletes/updates over a set of > tables, > and serve them over http, so I would like to off-

Re: [GENERAL] Wal files being delayed - Pgsql 9.2

2016-11-13 Thread Venkata B Nagothi
On Mon, Nov 14, 2016 at 1:22 PM, Patrick B wrote: > Hi guys, > > My current scenario is: > > master01 - Postgres 9.2 master DB > slave01 - Postgres 9.2 streaming replication + wal_files slave server for > read-only queries > slave02 - Postgres 9.2 streaming replication + wal_files slave server @

Re: [GENERAL] Fwd: Mail to be posted in PostgreSQL community

2016-11-15 Thread Venkata B Nagothi
On Tue, Nov 15, 2016 at 4:15 PM, kaustubh kelkar wrote: > > Hi, > > > > Trying to create multiple database instances of PostgreSQL 9.6 > In this case , trying to create 2nd instance with port 5434/5435. > > > > *1st attempt:* > > > > > *Create new database cluster : * > > C:\Program Files\Postgre

Re: [GENERAL] Check integrity between servers

2016-11-16 Thread Venkata B Nagothi
On Thu, Nov 17, 2016 at 10:19 AM, Patrick B wrote: > Would be possible to check the integrity between two database servers? > > Both servers are slaves (streaming replication + wal_files) but I believe > one of them, when recovered from wal_files in a fast outage we got, got > recovered not 100%.

Re: [GENERAL] Wal files - Question | Postgres 9.2

2016-11-22 Thread Venkata B Nagothi
On Wed, Nov 23, 2016 at 1:03 PM, Patrick B wrote: > Hi guys, > > I currently have a slave02 server that is replicating from another slave01 > via Cascading replication. The master01 server is shipping wal_files (via > ssh) to both slaves. > > > I'm doing some tests on slave02 to test the recovery

Re: [GENERAL] Wal files - Question | Postgres 9.2

2016-11-22 Thread Venkata B Nagothi
On Wed, Nov 23, 2016 at 1:59 PM, Patrick B wrote: > > > 2016-11-23 15:55 GMT+13:00 Venkata B Nagothi : > >> >> >> On Wed, Nov 23, 2016 at 1:03 PM, Patrick B >> wrote: >> >>> Hi guys, >>> >>> I currently have a slave02 server t

Re: [GENERAL] WAL history files - Pgsql 9.2

2016-12-11 Thread Venkata B Nagothi
On Mon, Dec 12, 2016 at 7:48 AM, Patrick B wrote: > Hi guys, > > Are the history files copied with the wal_files? Or I have to do it > separated? > > 0003.history': No such file or directory > > > I'm using PostgreSQL 9.2. > Can you please explain the scenario you are referring to ? during s

Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10

2016-12-19 Thread Venkata B Nagothi
On Mon, Dec 19, 2016 at 4:40 AM, wrote: > Hello List, > I am setting up Postgres 9.6 for streaming replication. The OS is > Solaris X86 I downloaded the postgres solaris binaries from the Postres > site and installed on 2 instances of Solaris 10. I then used pg_dumpall to > load the master

Re: [GENERAL] Postgres 9.6.1 big slowdown by upgrading 8.4.22

2017-01-06 Thread Venkata B Nagothi
On Sat, Jan 7, 2017 at 2:56 AM, Job wrote: > Hi guys, > > really much appreciated your replies. > > >> You might want to include the query plans for each server > > W e use a function, the explain analyze is quite similar: > POSTGRESQL 8.4.22: > > explain analyze select 'record.com' where 'recor

Re: [GENERAL] migrate Sql Server database to PostgreSql

2017-01-18 Thread Venkata B Nagothi
On Thu, Jan 19, 2017 at 6:17 AM, PAWAN SHARMA wrote: > Hello All, > > I am using postgres 9.5 enterprise edition. > > i want to to how to migrate Sql Server database to PostgreSql. what are > the things required for migration and what are the cron and prons of > migration. > Well, how challengi

Re: [GENERAL] Transaction apply speed on the standby

2017-01-27 Thread Venkata B Nagothi
On Fri, Jan 27, 2017 at 3:34 AM, Rakesh Kumar wrote: > Ver 9.6.1 > > In a streaming replication can it be assumed that if both primary and > standby are of the same hardware, then the rate at which transactions are > applied on the standby will be same as that on primary. Or standbys are > always

Re: [GENERAL] Question slow query

2017-01-27 Thread Venkata B Nagothi
On Tue, Jan 17, 2017 at 6:27 AM, Patrick B wrote: > > > 2017-01-12 16:48 GMT+13:00 Andreas Joseph Krogh : > >> På torsdag 12. januar 2017 kl. 03:15:59, skrev Patrick B < >> patrickbake...@gmail.com>: >> >> Hi guys, >> >> I've got a slow query, running at 25 seconds. >> >> >>

Re: [GENERAL] clarification about standby promotion

2017-02-08 Thread Venkata B Nagothi
On Thu, Feb 9, 2017 at 4:53 AM, Benoit Lobréau wrote: > Hi, > > > I would like to clarify something about standby promotion. From the > sentence below. I understand that, during the promotion process, postgres > will replay all the available wals (from the archive or pg_xlog). > Yes, that is cor

Re: [GENERAL] clarification about standby promotion

2017-02-09 Thread Venkata B Nagothi
On Fri, Feb 10, 2017 at 2:42 AM, Jehan-Guillaume de Rorthais wrote: > On Thu, 9 Feb 2017 10:41:15 +1100 > Venkata B Nagothi wrote: > > > On Thu, Feb 9, 2017 at 4:53 AM, Benoit Lobréau > > > wrote: > > > > > Hi, > > > > > > > > &g

Re: [GENERAL] Streaming Replication Without Downtime

2017-02-20 Thread Venkata B Nagothi
On Tue, Feb 21, 2017 at 6:53 AM, Gabriel Ortiz Lour wrote: > Hi! > > Thanks for pointing out pg_basebackup > > The issue I'm facing now is about missing WAL files. > > What i'm doing: > # su postgres -c 'pg_basebackup -D /var/lib/postgresql/9.1/main/ -x -h > master -U sa_rep' ; service post

Re: [GENERAL] Postgres HA

2017-02-22 Thread Venkata B Nagothi
On Thu, Feb 23, 2017 at 9:58 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. We use an LTM (load balancer) > serve

Re: [GENERAL] effective_cache_size X shared_buffer

2017-04-02 Thread Venkata B Nagothi
On Mon, Apr 3, 2017 at 11:23 AM, Patrick B wrote: > Hi guys. > > I'm thinking about increasing the query cache for my PG 9.2 server. > I've got a project happening, which is doing lots and lots of writes and > reads during the night, and in the morning I see PG cache warming up again, > as all th

Re: [GENERAL] effective_cache_size X shared_buffer

2017-04-02 Thread Venkata B Nagothi
On Mon, Apr 3, 2017 at 1:33 PM, Patrick B wrote: > 2017-04-03 13:23 GMT+12:00 Patrick B : > >> Hi guys. >> >> I'm thinking about increasing the query cache for my PG 9.2 server. >> I've got a project happening, which is doing lots and lots of writes and >> reads during the night, and in the morni

Re: [GENERAL] Migration Query

2017-05-08 Thread Venkata B Nagothi
On Tue, May 9, 2017 at 1:13 AM, PAWAN SHARMA wrote: > Hi All, > > Does one any having list of bottlenecks and workarounds while migrating > data > from Oracle to Postgresql. like what are thing which we can migrate from > Oracle database to Postgresql and what we can't? > In general you must be