[GENERAL] Try to understand VACUUM and its settings

2015-10-05 Thread Michael Chau
Hi, Last Friday, I ran : postgres=# select max(age(datfrozenxid)) from pg_database; max 42579490 and then I ran : SELECT relname, age(relfrozenxid) as xid_age, pg_size_pretty(pg_table_size(oid)) as table_size FROM pg_class WHERE relkind = 'r' and pg_table_size(oid) > 1073741824 ORDER BY ag

Re: [GENERAL] Broken primary key after backup restore.

2015-09-21 Thread Michael Chau
tgreSQL. I think that I will pursue this. Thanks again. On Fri, Sep 18, 2015 at 2:40 PM, David Steele wrote: > On 9/18/15 3:44 PM, Michael Chau wrote: > >> Hi Jeff, >> >> Only if you are very lucky. If your tar command tars up the pg_xlog >>> directory as the last

Re: [GENERAL] Broken primary key after backup restore.

2015-09-18 Thread Michael Chau
e: >> >>> Le 18 sept. 2015 5:23 AM, "Adrian Klaver" >> <mailto:adrian.kla...@aklaver.com>> a écrit : >>> > >>> > On 09/17/2015 05:37 PM, Michael Chau wrote: >>> >> >>> >> To restore on test

Re: [GENERAL] Broken primary key after backup restore.

2015-09-17 Thread Michael Chau
DB1 and DB2 that morning. But, I don't think that it harms anything. Thanks On Thu, Sep 17, 2015 at 4:53 PM, Adrian Klaver wrote: > On 09/17/2015 04:31 PM, Michael Chau wrote: > >> Hi, >> >> In Production, I have a DB2 which is replicated partially using Londiste &

[GENERAL] Broken primary key after backup restore.

2015-09-17 Thread Michael Chau
Hi, In Production, I have a DB2 which is replicated partially using Londiste from DB1. I make file-system backups nightly on both DBs. Last Monday, when I restored the backup made from DB2 to a test server, Postgres(9.3.5) started up fine. But, I found out that the primary key of one of the table