{"id":48813790,"url":"https://github.com/gautada/postgresql","last_synced_at":"2026-04-14T10:02:57.800Z","repository":{"id":37050359,"uuid":"323927103","full_name":"gautada/postgresql","owner":"gautada","description":"A basic Postgres from source","archived":false,"fork":false,"pushed_at":"2025-09-25T11:32:39.000Z","size":144,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-28T00:22:57.954Z","etag":null,"topics":["container","database","server"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gautada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-23T14:44:10.000Z","updated_at":"2026-02-27T02:44:31.000Z","dependencies_parsed_at":"2024-01-27T01:49:12.495Z","dependency_job_id":"e8059584-8b9b-4aa6-a48f-3c5439b56710","html_url":"https://github.com/gautada/postgresql","commit_stats":null,"previous_names":["gautada/postgresql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gautada/postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautada%2Fpostgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautada%2Fpostgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautada%2Fpostgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautada%2Fpostgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gautada","download_url":"https://codeload.github.com/gautada/postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gautada%2Fpostgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31791174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["container","database","server"],"created_at":"2026-04-14T10:02:57.591Z","updated_at":"2026-04-14T10:02:57.781Z","avatar_url":"https://github.com/gautada.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgeSQL\n\n[PostgreSQL](https://www.postgresql.org) PostgreSQL is a powerful, open\nsource object-relational database system with over 30 years of active\ndevelopment that has earned it a strong reputation for reliability,\nfeature robustness, and performance.\n\nThis image package is called `postgresql`. The server name will be\n`postgres.domain.tld`.  This is in view of the long standing\n[naming issue](https://wiki.postgresql.org/wiki/Postgres) that is known\nwithin the community.\n\n## Version\n\nCurrently this image is based on\n[PostgreSQL 15](https://www.postgresql.org/docs/15/index.html). Check\nthe specific version of the [package](https://pkgs.alpinelinux.org/packages?name=postgresql15\u0026branch=v3.21\u0026repo=community\u0026arch=aarch64\u0026origin=\u0026flagged=\u0026maintainer=)\nin the Alpine Packages Repository.\n\n## Configuration\n\nTo get the container up and running you must provide your own `pg_hba.conf`,\n`pg_ident.conf` and `postgresql.conf`.  The default config files from\nversion 15 are attached in this project (comments removed) but you should\noverride deployment configuration via configmaps.\n\n- **pg_hba.conf**:  (PostgreSQL Host-Based Authentication) file is a\nconfiguration file used by PostgreSQL to control client authentication.\nIt defines which users can connect, from where, using which authentication\nmethod.\n- **pg_ident.conf**: is used for username mapping\nbetween external authentication systems (such as OS users or Kerberos) and\nPostgreSQL database users. It is mainly used when authentication methods like\npeer, ident, or gss require mapping between system usernames and database\nroles.\n- **postgresql.conf**: is the main configuration file for PostgreSQL. It\ncontrols server behavior, resource usage, logging, networking,\nand performance tuning.\n\n## Databases\n\n### Lists databases\n\nTo list all of the database on the server use `\\list`\n\n## Users\n\nReplicator user is needed to support replica backups\n\n```sh\n/usr/bin/createuser --username=postgres --pwprompt --connection-limit=5 \\\n                    --replication replicator\n```\n\n### List users\n\nTo list all of the user on the server use `\\du`.\n\n### Encrypted passwords\n\n#### Enable encrypted passwords\n\nIn the `postgresql.conf` file enable encrypted password by added\n`password_encryption = scram-sha-256`.\n\n#### Set a user password\n\n```sql\nALTER USER myuser WITH ENCRYPTED PASSWORD 'mypassword';\n```\n\n#### Check a user has password set\n\n```sql\nSELECT rolname, rolpassword FROM pg_authid WHERE rolname = 'myuser';\n```\n\n#### Change database owner\n\n```sql\nALTER DATABASE mydb OWNER TO newuser;\n```\n\n#### Rename existing user\n\n```sql\nALTER ROLE test RENAME to test;\n```\n\n### TLS Setup\n\nTLS Setup will be turned off for the current period due to DNS issues and\nresolution issues.\n\nThis is the replica setup that used fill SSL.\n\n```txt\nprimary_conninfo = '\nhost=primary.postgresql.gautier.org\nport=5432\nuser=replicator\nsslmode=verify-full\nsslcert=/etc/container/secrets/client-cert.pem\nsslkey=/etc/container/secrets/client-key.pem\nsslrootcert=/etc/container/secrets/ca.pem\n'\n```\n\n#### Create Secret\n\n```sh\nkubectl create secret -n data generic postgresql \\\n  --from-file=key.pem=key.pem \\\n  --from-file=cert.pem=cert.pem \\\n  --from-file=ca.pem=ca.pem \\\n  --from-file=client-cert.pem=../client/cert.pem \\\n  --from-file=client-key.pem=../client/key.pem \\\n  --from-file=replicator.pgpass=../client/replicator.pgpass\n```\n\n## Notes\n\n- [Postgresql Video Series](https://www.youtube.com/playlist?list=PLHq1uqvAteVsnMSMVp-Tcb0MSBVKQ7GLg)\nwith supporting [materials](https://github.com/marcel-dempers/docker-development-youtube-series)\n- Testing\n\n### PRIMARY\n\n```sh\n/usr/bin/podman run --name pg_primary \\\n    --env POSTGRESQL_SERVER_TYPE=master \\\n--env POSTGRESQL_CONFIG_FILE=/mnt/volumes/configmaps/primary/postgresql.conf \\\n--env POSTGRESQL_REPLICA_HOST=replica.postgresql.gautier.org \\\n--env POSTGRESQL_REPLICA_PORT=5433 \\\n--env POSTGRESQL_REPLICA_USER=replicator \\\n    --interactive \\\n    --publish 5432:5432 \\\n    --rm \\\n    --tty \\\n    --volume Backup:/mnt/volumes/backups \\\n    --volume Data:/mnt/volumes/container \\\n    --volume Configmaps:/mnt/volumes/configmaps \\\n    --volume Secrets:/mnt/volumes/secrets \\\n      docker.io/gautada/postgresql:dev\n```\n\n### REPLICA\n\n```sh\n/usr/bin/podman run --name pg_replica \\\n    --env POSTGRESQL_SERVER_TYPE=replica \\\n--env POSTGRESQL_CONFIG_FILE=/mnt/volumes/configmaps/replica/postgresql.conf \\\n    --env POSTGRESQL_PRIMARY_HOST=primary.postgresql.gautier.org \\\n    --env POSTGRESQL_PRIMARY_USER=replicator \\\n    --interactive \\\n    --publish 5433:5432 \\\n    --rm \\\n    --tty \\\n    --volume Backup:/mnt/volumes/backups \\\n    --volume Data:/mnt/volumes/container \\\n    --volume Configmaps:/mnt/volumes/configmaps \\\n    --volume Secrets:/mnt/volumes/secrets \\\n      docker.io/gautada/postgresql:dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgautada%2Fpostgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgautada%2Fpostgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgautada%2Fpostgresql/lists"}