{"id":20803491,"url":"https://github.com/afiskon/pgscripts","last_synced_at":"2025-05-07T02:41:14.806Z","repository":{"id":49383271,"uuid":"64777471","full_name":"afiskon/pgscripts","owner":"afiskon","description":"A few scripts related to PostgreSQL development","archived":false,"fork":false,"pushed_at":"2025-02-27T12:53:13.000Z","size":49,"stargazers_count":30,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T05:31:43.367Z","etag":null,"topics":["bash","postgresql"],"latest_commit_sha":null,"homepage":"https://eax.me/postgresql-build/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afiskon.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}},"created_at":"2016-08-02T17:26:29.000Z","updated_at":"2025-02-27T12:53:16.000Z","dependencies_parsed_at":"2024-09-11T23:08:48.533Z","dependency_job_id":"6fc35cd7-21d6-43c3-89dd-3ff756683a77","html_url":"https://github.com/afiskon/pgscripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiskon%2Fpgscripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiskon%2Fpgscripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiskon%2Fpgscripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afiskon%2Fpgscripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afiskon","download_url":"https://codeload.github.com/afiskon/pgscripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252802474,"owners_count":21806512,"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":["bash","postgresql"],"created_at":"2024-11-17T18:53:26.481Z","updated_at":"2025-05-07T02:41:14.779Z","avatar_url":"https://github.com/afiskon.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgscripts\n\nA few scripts related to PostgreSQL development. Originally based on [Stas\nKelvich's][stas] code.\n\nUsed environment variables:\n\n* **$PGINSTALL** - where to install PostgreSQL.\n* **$PATH** - don't forget to add $PGINSTALL/bin here.\n* **$TMPDIR** - a directory for saving temporary files.\n\nIn order to install PostgreSQL dependencies run:\n\n```\n# for basic build\nsudo apt install gcc make flex bison pkg-config libreadline-dev \\\n  zlib1g-dev libssl-dev libxml2-dev libxslt1-dev libipc-run-perl \\\n  meson ninja-build\n\n# to build the documentation as well\nsudo apt install docbook docbook-dsssl docbook-xsl libxml2-utils \\\n  openjade opensp xsltproc\n\n# for code-coverage.sh\nsudo apt install lcov\n```\n\nTypical usage:\n\n```\ngit clone git://git.postgresql.org/git/postgresql.git\ncd postgresql\ngit checkout master\n# make sure the copy of the code is clean!\ngit clean -dfx\ncd ..\n\ngit clone https://github.com/afiskon/pgscripts.git\ncd pgscripts\n./full-build.sh \u0026\u0026 ./single-install.sh \u0026\u0026 make installcheck-world\n# or:\n./quick-build.sh \u0026\u0026 ./single-install.sh \u0026\u0026 make installcheck\n```\n\nBuilding with Meson:\n\n```\ngit clean -dfx\nmeson setup --buildtype debug \\\n  -DPG_TEST_EXTRA=\"kerberos ldap ssl\" \\\n  -Dldap=disabled -Dssl=openssl \\\n  -Dcassert=true -Dtap_tests=enabled \\\n  -Dprefix=/home/eax/pginstall build\nninja -C build\nninja -C build docs\nmeson test -C build\n../pgscripts/single-install-meson.sh\n```\n\nList of the scripts:\n\n* **quick-build.sh** - runs `configure` with some common flags, then runs `make`\n  and `make check`. Code is compiled with -O0. $PGINSTALL is used as a --prefix.\n* **clang-quick-build.sh** - same as quick-build.sh, but Clang is used instead of\n  GCC.\n* **full-build.sh** - same as quick-build.sh, but `make check-world` is executed\n  intead of `make check`.\n* **single-install.sh** - installs PostgreSQL to $PGINSTALL and runs it with custom\n  postgresql.conf.\n* **install.sh** - same as single-install.sh but configures streaming replication as\n  well.\n* **start.sh / stop.sh** - start/stop PostgreSQL using `pg_ctl`.\n* **kill.sh** - terminates all processes related to PostgreSQL with `pkill`.\n* **code-coverage.sh** - genereates a code coverage report (works only with GCC stack!).\n* **static-analysis.sh** - runs Clang Static Analyzer.\n* **valgrind.sh** - starts PostgreSQL under Valgrind.\n\n**Note:** `make installcheck` or `make installcheck-world` don't pass if there\nis a replication configured with master and replica on the same machine. This is\na known issue. Thus if you want to run `make installcheck` use\n`./single-install.sh` instead of `./install.sh`.\n\n[stas]: https://github.com/kelvich\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiskon%2Fpgscripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafiskon%2Fpgscripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafiskon%2Fpgscripts/lists"}