{"id":19871877,"url":"https://github.com/saltstack-formulas/postgres-formula","last_synced_at":"2025-05-15T23:06:32.656Z","repository":{"id":8924527,"uuid":"10653508","full_name":"saltstack-formulas/postgres-formula","owner":"saltstack-formulas","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-07T20:02:32.000Z","size":755,"stargazers_count":77,"open_issues_count":33,"forks_count":282,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-08T10:21:20.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html","language":"SaltStack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack-formulas.png","metadata":{"files":{"readme":"docs/README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-12T22:11:07.000Z","updated_at":"2024-01-20T10:46:02.000Z","dependencies_parsed_at":"2023-10-03T14:42:09.186Z","dependency_job_id":"6081133b-568e-4136-b90c-1bdbd8460ccc","html_url":"https://github.com/saltstack-formulas/postgres-formula","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fpostgres-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fpostgres-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fpostgres-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fpostgres-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack-formulas","download_url":"https://codeload.github.com/saltstack-formulas/postgres-formula/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436944,"owners_count":22070946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T16:13:52.467Z","updated_at":"2025-05-15T23:06:27.642Z","avatar_url":"https://github.com/saltstack-formulas.png","language":"SaltStack","funding_links":[],"categories":[],"sub_categories":[],"readme":"postgres-formula\n================\n\n|img_travis| |img_sr|\n\n.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/postgres-formula.svg?branch=master\n   :alt: Travis CI Build Status\n   :scale: 100%\n   :target: https://travis-ci.com/saltstack-formulas/postgres-formula\n.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :alt: Semantic Release\n   :scale: 100%\n   :target: https://github.com/semantic-release/semantic-release\n\nA formula to install and configure PostgreSQL server.\n\n.. contents:: **Table of Contents**\n\nGeneral notes\n-------------\n\nSee the full `SaltStack Formulas installation and usage instructions\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\nIf you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas\u003e`_.\n\nIf you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,\nwhich contains the currently released version. This formula is versioned according to `Semantic Versioning \u003chttp://semver.org/\u003e`_.\n\nSee `Formula Versioning Section \u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning\u003e`_ for more details.\n\nContributing to this repo\n-------------------------\n\n**Commit message formatting is significant!!**\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\nAvailable states\n----------------\n\n.. contents::\n   :local:\n\n``postgres``\n^^^^^^^^^^^^\n\nInstalls and configures both PostgreSQL server and client with creation of various DB objects in\nthe cluster. This state applies to both Linux and MacOS.\n\n``postgres.client``\n^^^^^^^^^^^^^^^^^^^\n\nInstalls the PostgreSQL client binaries and libraries on Linux.\n\n``postgres.manage``\n^^^^^^^^^^^^^^^^^^^\n\nCreates such DB objects as: users, tablespaces, databases, schemas and extensions.\nSee ``pillar.example`` file for details.\n\n``postgres.python``\n^^^^^^^^^^^^^^^^^^^\n\nInstalls the PostgreSQL adapter for Python on Linux.\n\n``postgres.server``\n^^^^^^^^^^^^^^^^^^^\n\nInstalls the PostgreSQL server package on Linux, prepares the DB cluster and starts the server using\npackaged init script, job or unit.\n\n\n.. note::\n\n    For PostgreSQL server before version 10 to work inside a **FreeBSD Jail**\n    set ``sysvshm=new`` and ``sysvsem=new``.\n    DO NOT SET ``allow.sysvipc=1``. It defeats the purpose of using Jails.\n\n    Further information: https://blog.tyk.nu/blog/freebsd-jails-and-sysv-ipc/\n\n\n**Running inside a container** (using Packer, Docker or similar tools), when OS ``init`` process\nis not available to start the service and enable it on \"boot\", set pillar value:\n\n.. code:: yaml\n\n  postgres:\n    bake_image: True\n\nThis toggles starting PostgreSQL daemon by issuing raw ``pg_ctl`` or ``pg_ctlcluster`` command.\n\n``postgres.upstream``\n^^^^^^^^^^^^^^^^^^^^^\n\nConfigures the PostgreSQL Official (upstream) repository on target system if\napplicable.\n\nThe state relies on the ``postgres:use_upstream_repo`` Pillar value which could be set as following:\n\n* ``True`` (default): adds the upstream repository to install packages from\n* ``False``: makes sure that the repository configuration is absent\n* ``'postgresapp'`` (MacOS) uses upstream PostgresApp package repository.\n* ``'homebrew'`` (MacOS) uses Homebrew postgres\n\nThe ``postgres:version`` Pillar controls which version of the PostgreSQL packages should be\ninstalled from the upstream Linux repository. Defaults to ``9.5``.\n\n\nRemoval states\n--------------\n\n``postgres.dropped``\n^^^^^^^^^^^^^^^^^^^^\n\nMeta state to remove Postgres software. By default the release installed by formula is targeted only. To target multiple releases, set pillar ``postgres.remove.multiple_releases: True``.\n\n``postgres.server.remove``\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nRemove server, lib, and contrib packages. The ``postgres.server.remove`` will retain data by default (no data loss) - set pillar ``postgres.remove.data: True`` to remove data and configuration directories also.\n\n``postgres.client.remove``\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nRemove client package.\n\n``postgres.dev.remove``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nRemove development and python packages.\n\n\nTesting\n-------\n\nLinux testing is done with ``kitchen-salt``.\n\n``kitchen converge``\n^^^^^^^^^^^^^^^^^^^^\n\nCreates the docker instance and runs the ``postgres`` main state, ready for testing.\n\n``kitchen verify``\n^^^^^^^^^^^^^^^^^^\n\nRuns the ``inspec`` tests on the actual instance.\n\n``kitchen destroy``\n^^^^^^^^^^^^^^^^^^^\n\nRemoves the docker instance.\n\n``kitchen test``\n^^^^^^^^^^^^^^^^\n\nRuns all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.\n\n``kitchen login``\n^^^^^^^^^^^^^^^^^\n\nGives you SSH access to the instance for manual testing.\n\nTesting with Vagrant\n--------------------\n\nWindows/FreeBSD/OpenBSD testing is done with ``kitchen-salt``.\n\nRequirements\n^^^^^^^^^^^^\n\n* Ruby\n* Virtualbox\n* Vagrant\n\nSetup\n^^^^^\n\n.. code-block:: bash\n\n   $ gem install bundler\n   $ bundle install --with=vagrant\n   $ bin/kitchen test [platform]\n\nWhere ``[platform]`` is the platform name defined in ``kitchen.vagrant.yml``,\ne.g. ``windows-81-latest-py3``.\n\nNote\n^^^^\n\nWhen testing using Vagrant you must set the environment variable ``KITCHEN_LOCAL_YAML`` to ``kitchen.vagrant.yml``.  For example:\n\n.. code-block:: bash\n\n   $ KITCHEN_LOCAL_YAML=kitchen.vagrant.yml bin/kitchen test      # Alternatively,\n   $ export KITCHEN_LOCAL_YAML=kitchen.vagrant.yml\n   $ bin/kitchen test\n\nThen run the following commands as needed.\n\n``bin/kitchen converge``\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nCreates the Vagrant instance and runs the ``postgres`` main state, ready for testing.\n\n``bin/kitchen verify``\n^^^^^^^^^^^^^^^^^^^^^^\n\nRuns the ``inspec`` tests on the actual instance.\n\n``bin/kitchen destroy``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nRemoves the Vagrant instance.\n\n``bin/kitchen test``\n^^^^^^^^^^^^^^^^^^^^\n\nRuns all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.\n\n``bin/kitchen login``\n^^^^^^^^^^^^^^^^^^^^^\n\nGives you RDP/SSH access to the instance for manual testing.\n\n.. vim: fenc=utf-8 spell spl=en cc=100 tw=99 fo=want sts=2 sw=2 et\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fpostgres-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack-formulas%2Fpostgres-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fpostgres-formula/lists"}