{"id":16451699,"url":"https://github.com/jnidzwetzki/postgresql-sandbox","last_synced_at":"2025-06-12T00:33:19.408Z","repository":{"id":74260567,"uuid":"476670031","full_name":"jnidzwetzki/postgresql-sandbox","owner":"jnidzwetzki","description":"PostgreSQL sandbox installer","archived":false,"fork":false,"pushed_at":"2024-04-30T07:25:00.000Z","size":23,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-27T16:40:39.950Z","etag":null,"topics":["postgres","postgresql","sandbox"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jnidzwetzki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-04-01T10:11:24.000Z","updated_at":"2024-11-25T04:13:28.000Z","dependencies_parsed_at":"2023-11-19T09:23:56.233Z","dependency_job_id":"c386aeae-563e-47a9-b31f-064c23f139a7","html_url":"https://github.com/jnidzwetzki/postgresql-sandbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jnidzwetzki/postgresql-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fpostgresql-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fpostgresql-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fpostgresql-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fpostgresql-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnidzwetzki","download_url":"https://codeload.github.com/jnidzwetzki/postgresql-sandbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnidzwetzki%2Fpostgresql-sandbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259369950,"owners_count":22847180,"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":["postgres","postgresql","sandbox"],"created_at":"2024-10-11T10:10:00.028Z","updated_at":"2025-06-12T00:33:19.385Z","avatar_url":"https://github.com/jnidzwetzki.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgreSQL Sandbox Installer\n\nThis project provides a sandbox installer for PostgreSQL. It can be used to download, compile, and install multiple PostgreSQL versions in parallel on a single system. All PostgreSQL installations are compiled with different configurations (`RELEASE`, `DEBUG`, and `SANITIZER`). The `RELEASE` build is an optimized PostgreSQL like the build that is provided by Linux Distributions, `DEBUG` is an unoptimized build that contains debug symbols. `SANITIZER` is a build that is compiled and statically linked against an address sanitizer (libasan) and a leak analyzer (liblsan).\n\nFor example, such a collection of local PostgreSQL installations is helpful if you develop PostgreSQL extensions and you have to test them on different versions (e.g., 12, 13, 14, and 15).\n\n## Usage\n\n### PostgreSQL Installation\nInstall the PostgreSQL sandbox by executing the following commands:\n\n```\ngit clone git@github.com:jnidzwetzki/postgresql-sandbox.git\n```\n\nCreate a `src` directory inside of the downloaded sandbox to indicate that this directory should be used as the sandbox directory:\n\n```\ncd postgresql-sandbox\nmkdir src\n```\n\nAdjust the `VERSIONS` setting inside of the script. This contains the PostgreSQL installations that should be installed. For example, if you set the variable to `VERSIONS=\"REL_12_10 REL_13_6 REL_14_2 REL_15_1 REL_14_STABLE\"` PostgreSQL 12.10, 14.2, 15.1 and the latest 14 PostgreSQL versions are installed. These strings are the [branches](https://github.com/postgres/postgres/branches) and [tags](https://github.com/postgres/postgres/tags) of the [PostgreSQL git repository](https://github.com/postgres/postgres/).\n\nAfterward, the PostgreSQL installations can be downloaded and installed by executing:\n\n```\n./postgres-sandbox.sh postgres_install\n```\n\nIn addition, the `initdb` binary is invoked for each of the installations. \n\n_Note:_ Only new PostgreSQL installations are downloaded by this command. Only new versions are handled, and the remaining installations stay untouched. So, you can add further PostgreSQL versions to the `VERSIONS` setting and re-run the command.\n\nAfter the command is complete, the `src` folder contains the sources of all of these PostgreSQL installations:\n\n```\njan@debian11-work:~/postgresql-sandbox$ ls -l src/\ntotal 64\ndrwxr-xr-x 7 jan jan 4096 Apr  1  2022 postgres.git\ndrwxr-xr-x 7 jan jan 4096 Oct 31 12:33 REL_12_10_DEBUG\ndrwxr-xr-x 7 jan jan 4096 Oct 31 12:37 REL_12_10_RELEASE\ndrwxr-xr-x 7 jan jan 4096 Dec  8 08:32 REL_12_10_SANITIZE\ndrwxr-xr-x 7 jan jan 4096 Oct 31 12:20 REL_13_6_DEBUG\ndrwxr-xr-x 7 jan jan 4096 Oct 31 12:23 REL_13_6_RELEASE\ndrwxr-xr-x 7 jan jan 4096 Dec  7 11:16 REL_14_2_DEBUG\ndrwxr-xr-x 7 jan jan 4096 Oct 31 12:17 REL_14_2_RELEASE\ndrwxr-xr-x 7 jan jan 4096 Dec  7 16:04 REL_14_2_SANITIZE\ndrwxr-xr-x 7 jan jan 4096 Dec 10 13:47 REL_15_1_DEBUG\ndrwxr-xr-x 7 jan jan 4096 Nov 17 09:53 REL_15_1_RELEASE\ndrwxr-xr-x 7 jan jan 4096 Dec 10 13:51 REL_15_1_SANITIZE\n```\n\nThe `bin` folder contains the binaries of these PostgreSQL installations and in `data` folder are the databases located.\n\n### Use the PostgreSQL Installations\n\nTo start a PostgreSQL installation, the command `postgres_start` together with the PostgreSQL installation name can be used. The following command starts the debug build of the PostgreSQL 15.1 installation.\n\n```\n~/postgresql-sandbox/postgres-sandbox.sh postgres_start REL_15_1_DEBUG\n```\n\nTo stop the PostgreSQL installation, the `postgres_stop` command has to be used:\n\n```\n~/postgresql-sandbox/postgres-sandbox.sh postgres_stop REL_15_1_DEBUG\n```\n\nTo get the PostgreSQL binaries (e.g., `initdb` or `psql`) into the path of the current shell, the path variable has to be adjusted. The following command adds the binaries of the PostgreSQL 14.2 release build to the path:\n\n```\nexport PATH=~/postgresql-sandbox/bin/REL_14_2_RELEASE/bin:$PATH\n```\n\nTo create a database and connect to the PostgreSQL server, the following commands can be used:\n\n```\ncreatedb mydb\npsql mydb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnidzwetzki%2Fpostgresql-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnidzwetzki%2Fpostgresql-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnidzwetzki%2Fpostgresql-sandbox/lists"}