Thread: BUG #5967: Db maintainace
The following bug has been logged online: Bug reference: 5967 Logged by: Savita Email address: savita.halli@ca.com PostgreSQL version: 8.3.5 Operating system: Linux Description: Db maintainace Details: Hi We are using the postgres database and would like to know what are the db maintainance activity need to be carried out for postgres and how frequently. Thanks in advance. Thanks Savita
On Thu, Apr 07, 2011 at 07:38:49AM +0000, Savita wrote: > > The following bug has been logged online: > > Bug reference: 5967 > Logged by: Savita > Email address: savita.halli@ca.com > PostgreSQL version: 8.3.5 > Operating system: Linux > Description: Db maintainace > Details: > > Hi > > We are using the postgres database and would like to know what are the db > maintainance activity need to be carried out for postgres and how > frequently. First of all - this is not a bug, so please don't report it as a bug. Second of all - did you read this part of documentation: http://www.postgresql.org/docs/8.3/interactive/maintenance.html Best regards, depesz
SGkgRGVwZXN6DQoNCkkgdW5kZXJzdGFuZCB0aGF0IHRoaXMgaXMgbm90IGEg YnVnIGJ1dCBJIHdhcyBub3QgYXdhcmUgb2YgYW55IG90aGVyIHdheSB0byBn ZXQgdGhlIGluZm9ybWF0aW9uIHNvIEkgcmVwb3J0ZWQgaGVyZS4NCkNvdWxk IHlvdSBwbGVhc2UgbGV0IG1lIGtub3cgaG93IGZyZXF1ZW50bHkgd2UgbmVl ZCB0byBnbyBmb3IgZGIgbWFpbnRhaW5hbmNlPw0KDQpUaGFua3MNClNhdml0 YQ0KDQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBkZXBl c3pAZGVwZXN6LmNvbSBbbWFpbHRvOmRlcGVzekBkZXBlc3ouY29tXSANClNl bnQ6IFRodXJzZGF5LCBBcHJpbCAwNywgMjAxMSA2OjM4IFBNDQpUbzogSGFs bGksIFNhdml0YQ0KQ2M6IHBnc3FsLWJ1Z3NAcG9zdGdyZXNxbC5vcmcNClN1 YmplY3Q6IFJlOiBbQlVHU10gQlVHICM1OTY3OiBEYiBtYWludGFpbmFjZQ0K DQpPbiBUaHUsIEFwciAwNywgMjAxMSBhdCAwNzozODo0OUFNICswMDAwLCBT YXZpdGEgd3JvdGU6DQo+IA0KPiBUaGUgZm9sbG93aW5nIGJ1ZyBoYXMgYmVl biBsb2dnZWQgb25saW5lOg0KPiANCj4gQnVnIHJlZmVyZW5jZTogICAgICA1 OTY3DQo+IExvZ2dlZCBieTogICAgICAgICAgU2F2aXRhDQo+IEVtYWlsIGFk ZHJlc3M6ICAgICAgc2F2aXRhLmhhbGxpQGNhLmNvbQ0KPiBQb3N0Z3JlU1FM IHZlcnNpb246IDguMy41DQo+IE9wZXJhdGluZyBzeXN0ZW06ICAgTGludXgN Cj4gRGVzY3JpcHRpb246ICAgICAgICBEYiBtYWludGFpbmFjZQ0KPiBEZXRh aWxzOiANCj4gDQo+IEhpDQo+IA0KPiBXZSBhcmUgdXNpbmcgdGhlIHBvc3Rn cmVzIGRhdGFiYXNlIGFuZCB3b3VsZCBsaWtlIHRvIGtub3cgd2hhdCBhcmUg dGhlIGRiDQo+IG1haW50YWluYW5jZSBhY3Rpdml0eSBuZWVkIHRvIGJlIGNh cnJpZWQgb3V0IGZvciBwb3N0Z3JlcyBhbmQgaG93DQo+IGZyZXF1ZW50bHku DQoNCkZpcnN0IG9mIGFsbCAtIHRoaXMgaXMgbm90IGEgYnVnLCBzbyBwbGVh c2UgZG9uJ3QgcmVwb3J0IGl0IGFzIGEgYnVnLg0KDQpTZWNvbmQgb2YgYWxs IC0gZGlkIHlvdSByZWFkIHRoaXMgcGFydCBvZiBkb2N1bWVudGF0aW9uOg0K aHR0cDovL3d3dy5wb3N0Z3Jlc3FsLm9yZy9kb2NzLzguMy9pbnRlcmFjdGl2 ZS9tYWludGVuYW5jZS5odG1sDQoNCkJlc3QgcmVnYXJkcywNCg0KZGVwZXN6 DQoNCg==
On Thu, Apr 07, 2011 at 06:50:16PM +0530, Halli, Savita wrote: > Hi Depesz > > I understand that this is not a bug but I was not aware of any other way to get the information so I reported here. http://www.postgresql.org/ click on "community" click on "mailing lists" pick one, subscribe, and ask there i would guess that -general, or -admin would be ok. > Could you please let me know how frequently we need to go for db maintainance? sorry, not sure what you mean by "to go for db maintainace". did you read the maintenance chapter in docs? Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/
WWVzLCBJIGFtIGdvaW5nIHRocm91Z2ggdGhhdC4gSXRzIG1lbnRpb25lZCB0 aGF0IHNvbWUgb2YgdGhlIGNvbW1hbmRzIG5lZWQgdG8gYmUgcnVuLiBNeSBx dWVzdGlvbiBpcyBob3cgZnJlcXVlbnRseSB3ZSBuZWVkIHRvIHJ1biB0aG9z ZSBjb21tYW5kcyhjb21tYW5kcyBmb3IgZGIgbWFpbnRhaW5hbmNlKS4NCg0K VGhhbmtzDQpTYXZpdGENCg0KLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0N CkZyb206IGRlcGVzekBkZXBlc3ouY29tIFttYWlsdG86ZGVwZXN6QGRlcGVz ei5jb21dIA0KU2VudDogVGh1cnNkYXksIEFwcmlsIDA3LCAyMDExIDc6MDYg UE0NClRvOiBIYWxsaSwgU2F2aXRhDQpDYzogcGdzcWwtYnVnc0Bwb3N0Z3Jl c3FsLm9yZw0KU3ViamVjdDogUmU6IFtCVUdTXSBCVUcgIzU5Njc6IERiIG1h aW50YWluYWNlDQoNCk9uIFRodSwgQXByIDA3LCAyMDExIGF0IDA2OjUwOjE2 UE0gKzA1MzAsIEhhbGxpLCBTYXZpdGEgd3JvdGU6DQo+IEhpIERlcGVzeg0K PiANCj4gSSB1bmRlcnN0YW5kIHRoYXQgdGhpcyBpcyBub3QgYSBidWcgYnV0 IEkgd2FzIG5vdCBhd2FyZSBvZiBhbnkgb3RoZXIgd2F5IHRvIGdldCB0aGUg aW5mb3JtYXRpb24gc28gSSByZXBvcnRlZCBoZXJlLg0KDQpodHRwOi8vd3d3 LnBvc3RncmVzcWwub3JnLw0KY2xpY2sgb24gImNvbW11bml0eSINCmNsaWNr IG9uICJtYWlsaW5nIGxpc3RzIg0KcGljayBvbmUsIHN1YnNjcmliZSwgYW5k IGFzayB0aGVyZQ0KDQppIHdvdWxkIGd1ZXNzIHRoYXQgLWdlbmVyYWwsIG9y IC1hZG1pbiB3b3VsZCBiZSBvay4NCg0KPiBDb3VsZCB5b3UgcGxlYXNlIGxl dCBtZSBrbm93IGhvdyBmcmVxdWVudGx5IHdlIG5lZWQgdG8gZ28gZm9yIGRi IG1haW50YWluYW5jZT8NCg0Kc29ycnksIG5vdCBzdXJlIHdoYXQgeW91IG1l YW4gYnkgInRvIGdvIGZvciBkYiBtYWludGFpbmFjZSIuDQoNCmRpZCB5b3Ug cmVhZCB0aGUgbWFpbnRlbmFuY2UgY2hhcHRlciBpbiBkb2NzPw0KDQpCZXN0 IHJlZ2FyZHMsDQoNCmRlcGVzeg0KDQotLSANClRoZSBiZXN0IHRoaW5nIGFi b3V0IG1vZGVybiBzb2NpZXR5IGlzIGhvdyBlYXN5IGl0IGlzIHRvIGF2b2lk IGNvbnRhY3Qgd2l0aCBpdC4NCiAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodHRwOi8vZGVw ZXN6LmNvbS8NCg==
On 04/07/11 6:53 AM, Halli, Savita wrote: > Yes, I am going through that. Its mentioned that some of the commands need to be run. My question is how frequently weneed to run those commands(commands for db maintainance). how frequently do you need to do file system maintenance? or for that matter, how often do you have to wash your car? the answer, my friends, is it depends on far too many factors for a generic answer. with autovacumn in place and with your database reasonably well tuned to your application requirements, there may be NO need for scheduled regular maintenance, other than backups. but, again, this would far better be discussed on the -general or -admin email lists, not on -bugs.
SGkNCg0KVGhhbmtzIGZvciB0aGUgcmVwbHkgYW5kIHNvcnJ5IGZvciBkZWxh eWVkIHF1ZXJ5Lg0KDQpIb3cgZnJlcXVlbnRseSBJIG1lYW4gaXMgDQoNCldo ZW4gd2UgbmVlZCB0byBydW0gdmFjdXVtZGIgYW5kIHJlaW5kZXhkYiBjb21t YW5kcywgd291bGQgbGlrZSB0byBrbm93IGhvdyBvZnR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N1cmUgd2hhdCB5b3UgbWVhbiBieSAidG8gZ28gZm9yIGRiIG1h aW50YWluYWNlIi4NCg0KZGlkIHlvdSByZWFkIHRoZSBtYWludGVuYW5jZSBj aGFwdGVyIGluIGRvY3M/DQoNCkJlc3QgcmVnYXJkcywNCg0KZGVwZXN6DQoN Ci0tIA0KVGhlIGJlc3QgdGhpbmcgYWJvdXQgbW9kZXJuIHNvY2lldHkgaXMg aG93IGVhc3kgaXQgaXMgdG8gYXZvaWQgY29udGFjdCB3aXRoIGl0Lg0KICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGh0dHA6Ly9kZXBlc3ouY29tLw0K
On Wed, May 18, 2011 at 12:16 AM, Halli, Savita <Savita.Halli@ca.com> wrote: > > When we need to rum vacuumdb and reindexdb commands, would like to know h= ow often we need to perform these ooperation? Is it > once in a week, month or other? > correct answer is: depends on your work load... if you have a recent version of postgres, better you can do is configure autovacuum and let it do most of the job... and by a recent version i mean at least 8.3 (preferable 8.4 or superior) btw, any new question you have please send it to pgsql-general@postgresql.org or another one that fits more with the question from the page Hubert show you --=20 Jaime Casanova=A0 =A0 =A0 =A0=A0 www.2ndQuadrant.com Professional PostgreSQL: Soporte y capacitaci=F3n de PostgreSQL