Commits on Jan 8, 2016

  1. Add disable_maintenance parameter to remove cronjob if unwanted

    Prior to this commit you would get the cron job installed but to
    disable the maintenance cron job you'd have to remove the class
    and remove the cron manually.
    
    With the addition of this commit, you can simply set the disable
    maintenance parameter to remove the cron job for you.
    npwalker committed Jan 8, 2016
    Configuration menu
    Copy the full SHA
    73a576e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ce51abf View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2016

  1. Add autovacuum settings to pe-postgresql

    In the past I've seen the console and puppetdb databases grow
    much larger than expected and I have a hypothesis that this is
    because the default 20% setting for autovacuum is too high for our
    workload.  So, there's a potential that changing this to 5%
    might be too low and might reduce performance but it should
    reduce disk usage and it can always be tuned upward if the
    performance hit is too large, however, it is much more difficult
    to reduce the size of a database after it has grown too large.
    
    Basically, I'm erroring on the side of using less disk space and
    hopefully less outages due to running out of disk space and we
    can open a conversation on performance later if one needs to be had.
    npwalker committed Mar 14, 2016
    Configuration menu
    Copy the full SHA
    b3dd637 View commit details
    Browse the repository at this point in the history
  2. Notify console-services when restarting postgresql

    Due to an issue where console-services fails to complete about
    2 requests after a restart of postgresql, let's go ahead and
    restart the console-services service if we restart the postgresql
    service.
    
    If the console-services is not on the same node as postgresql then
    set all_in_one_pe_install to false and console-services will not
    be restarted.
    npwalker committed Mar 14, 2016
    Configuration menu
    Copy the full SHA
    2c50606 View commit details
    Browse the repository at this point in the history
  3. Add data type validation to pe_postgresql_management profile

    Prior to this commit the parameters were not validated.
    
    After this commit, the parameters are correctly validated.
    
    Due to MODULES-2960 $autovacuum_scale_factor is validated as a float
    but then is converted to a string to pass it to the value attribute
    of postgresql_conf.
    npwalker committed Mar 14, 2016
    Configuration menu
    Copy the full SHA
    0adfb9e View commit details
    Browse the repository at this point in the history
  4. Break out analyze_scale_factor and vacuum_scale_factor params

    Prior to this commit, these two settings were based on the same
    single parameter.
    
    After this commit, the setting have their own dedicated parameter.
    
    In a default install of postgresql the analyze scale factor is .1
    and the vacuum scale factor is .2.  I assume the ratio is correct
    so when reducing the settings to be more aggressive I keep the
    2 to 1 ratio of the settings.
    npwalker committed Mar 14, 2016
    Configuration menu
    Copy the full SHA
    ef2f35f View commit details
    Browse the repository at this point in the history
  5. Add prototype defined type for backing up databases

    This commit adds the ability to make one cron job per database
    to run pg_dump.
    
    I don't particularly like the approach as you have to space out the
    cron jobs far enough to make sure they won't overlap but then you
    also have lots of wasted time in the middle.
    
    In a future commit, it would be better to have a single script to
    perform all the backups and have it run via a single cron job.
    npwalker committed Mar 14, 2016
    Configuration menu
    Copy the full SHA
    44244e7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b1b2b50 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2016

  1. Configuration menu
    Copy the full SHA
    7c2bad5 View commit details
    Browse the repository at this point in the history
  2. Add commonly changed postgresql settings as parameters

    Prior to this commit, we only managed autovacuum settings.
    
    After this commit, we manage many more commonly changed postgresql
    settings.
    
    We also set autovacuum_cost_delay=0 on the fact_values table of
    pe-puppetdb because it prevents bloat of the table and its indexes
    if customers have a lot of facts that change every run.
    npwalker committed Apr 5, 2016
    Configuration menu
    Copy the full SHA
    ed0879d View commit details
    Browse the repository at this point in the history
  3. Allow setting a hash of arbitrary postgresql settings

    Prior to this commit, you could only manage the settings that were
    provided as parameters.
    
    After this commit, you can pass an arbitrary hash of other
    postgresql settings you'd like to manage and they will be managed
    as well.
    npwalker committed Apr 5, 2016
    Configuration menu
    Copy the full SHA
    ead4013 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e0517b8 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2016

  1. Configuration menu
    Copy the full SHA
    b17b537 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2016

  1. Make a defined type for setting table attributes

    Prior to this commit, there was a psql command to change a table
    attribute.  This was difficult when trying to point people to an
    example that would allow them to do the same for a different table
    
    After this commit, the psql command has been abstracted into a
    defined type that makes it easier to set arbitrary table attributes.
    A new defined type has been made for the specific case of setting
    autovacuum_cost_delay=0
    npwalker committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    4e8de53 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2016

  1. Update defaults

    npwalker committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    fe8f966 View commit details
    Browse the repository at this point in the history
  2. Add backup script and defined type for using it

    Prior to this commit, there was no backup script.
    
    After this commit, there is a backup script that will iterate
    through an array of database names to produce a script to backup
    each database.
    
    Using the defined type, you can backup an arbitrary set of
    databases on a different cron schedule.
    npwalker committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    f306465 View commit details
    Browse the repository at this point in the history
  3. Refactor to use a single non-dynamic script (#1)

    Prior to this commit, a separate backup script was generated for each
    database. This commit replaces all of that with a single bash script
    that can backup an arbitrary list of databases.
    supercow authored and npwalker committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    77d713f View commit details
    Browse the repository at this point in the history
  4. Encapsulate backup into its own class

    Prior to this commit, the backup functionality was partially inside
    init.pp and partially in a defined type.
    
    After this commit, the backup functionality is in its own class
    pe_databases::backup.
    npwalker committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    f447b17 View commit details
    Browse the repository at this point in the history
  5. Change ensure_resource(file) back to file resources

    Prior to this commit, we used ensure_resource because it was meant
    to be inside a defined type that may be specified more than once.
    Now the defined type is gone and backup is a class
    
    After this commit, we use file resources for clarity since the class
    should not be defined more than once.
    npwalker committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    f567911 View commit details
    Browse the repository at this point in the history
  6. Improve *_work_mem defaults

    Prior to this commit, the *_work_mem settings assumed a dedicated
    postgresql node.
    
    After this commit, we use whether the node is an all_in_one install
    to determine the defaults.
    npwalker committed Sep 26, 2016
    Configuration menu
    Copy the full SHA
    3d56927 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2016

  1. Add retention policy to backup script (#4)

    Prior to this commit, the backup script simply backed up but never
    worried about preventing the storage of too many backups.
    
    After this commit, the backup script has a retention policy and
    deletes more than the desired number of backups minus 1 backups
    so that the new backup can be completed.
    
    This will likely cause valid backups to be deleted if the backups
    fail and create an empty file.  Then there will be no valid backups
    if nothing is done to intervene but we're choosing that option
    over running out of disk space by not aggresively deleting backups.
    npwalker authored Oct 17, 2016
    Configuration menu
    Copy the full SHA
    b092449 View commit details
    Browse the repository at this point in the history
  2. Add a README

    npwalker committed Oct 17, 2016
    Configuration menu
    Copy the full SHA
    119fabf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    88847d1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cda3e55 View commit details
    Browse the repository at this point in the history
  5. Update README with basic information about the module

    Prior to this commit, we had basic postgresql information in the
    README
    
    After this commit, we have specifics around the module and things
    you may want to change.  Including how to change the backup
    schedule using the provided classes.
    npwalker committed Oct 17, 2016
    Configuration menu
    Copy the full SHA
    3e8c644 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6af3e11 View commit details
    Browse the repository at this point in the history