Re: [GENERAL] Slow query on primary server runs fast on hot standby

2016-07-15 Thread Kaixi Luo
; relpages | reltuples | relname --+-+- 49217 | 9.70814e+06 | PK_SPATIAL_ARTIFACT 14329 | 5.22472e+06 | idx_own_spas 3423824 | 1.11087e+07 | spatial_artifact (3 rows) On Fri, Jul 15, 2016 at 11:12 AM, Sameer Kumar wrote: > > > On Fri, Jul 15, 2016 at 4:17 PM Kaixi Luo w

[GENERAL] Slow query on primary server runs fast on hot standby

2016-07-15 Thread Kaixi Luo
Hello, I have a primary PostgreSQL server with 64GB of RAM that is replicated using streaming replication to a hot standby server with 16GB of RAM. My problem is as follows: I've detected a query that takes a long time to run on my primary server but runs very fast on the standby server. I did an

Re: [GENERAL] How safe is pg_basebackup + continuous archiving?

2016-07-05 Thread Kaixi Luo
Thank you all a lot for the detailed answers! :) Kaixi On Thu, Jun 30, 2016 at 3:15 PM Michael Paquier wrote: > On Thu, Jun 30, 2016 at 9:00 PM, Kaixi Luo wrote: > >> Before replaying a backup on a production system, you would need a > >> pre-production setup where the b

Re: [GENERAL] How safe is pg_basebackup + continuous archiving?

2016-06-30 Thread Kaixi Luo
> > Before replaying a backup on a production system, you would need a > pre-production setup where the backup is replayed and checked. > Honestly, you can only be sure that a backup is working correctly > after reusing it. You could always do some validation of the raw > backup contents, but you n

[GENERAL] How safe is pg_basebackup + continuous archiving?

2016-06-29 Thread Kaixi Luo
the master server, the corruption would be carried over to our backup server. How can we check for backup corruption in this case? Thanks you very much. Kaixi Luo