WebFaction
Community site: login faq

Hi,

I was wondering how you PostgreSQL users maintain/optimize your DB? Vacuuming, Analyzing, Re-indexing…?

Have you set up a cron job like in this old post: http://forum.webfaction.com/viewtopic.php?id=2131 or are you relying on autovacuum?

:-B

asked 08 Dec '10, 00:55

Ben
111
accept rate: 0%


I just did a cursory search through cron jobs on a handful of our servers, looking for 'reindexdb' and found that only one user out of ~400 is reindexing their PostgreSQL databases via a cron job.

Based on that, and on the fact that I've seen very few support tickets asking how to set up cron jobs like those mentioned in the forum post you referenced, I think that probably very few of our users are doing their own automatic scheduled maintenance on their PostgreSQL databases.

Of course, I could be wrong - my search was not exhaustive by any stretch of the imagination :)

permanent link

answered 09 Dec '10, 11:08

seanf
12.2k41836
accept rate: 37%

Thank you for the insight :) Is the Auto-Vacuum Daemon automatically enabled on all PostgreSQL databases or should I at least make a vacuum cron?

(09 Dec '10, 11:40) Ben
2

The autovacuum daemon is enabled for all PostgreSQL databases.

(09 Dec '10, 11:57) seanf

Sweet! Cheers mate!

(09 Dec '10, 13:45) Ben

What additional maintenance can we set up that would be useful? I have a table with about 3 million rows that seems to be bogging down in the past week. Beyond adding a nightly REINDEX, what else can I do (given VACUUM happens for me)?

permanent link

answered 04 Aug '12, 10:31

tclancy
861515
accept rate: 6%

Build your own postgres server from source code and you have unlimited control, you can fine-tune the stack using the info found here.

(04 Aug '12, 17:14) johns
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×3

question asked: 08 Dec '10, 00:55

question was seen: 5,664 times

last updated: 04 Aug '12, 17:14

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM