PostgreSQL: Add initial v17.4 package#4267
Conversation
|
@DigitalBox98 @ymartin59 are you still interested in PostgreSQL package? |
|
Yes :) |
|
I can't get this build for alpine. Am I missing someting? I tried:
|
|
@RMHogervorst did you try (in the spk/postgres folder)? an alternative would be: |
|
wow, that was the piece of missing information! I think I missed this because the developer docs talk about It now fails on zlib |
|
it seems the current version of zlib is 1.2.13 (released October 13, 2022 ) because of a cve all previous versions are unavailable I think. Here are the changes, not in an PR, not just because I am lazy, but also because I think you should verify the hash digests yourself since I am a random person on the internet. cross/zlib/makefile and the digests in cross/zlib/digests |
|
@RMHogervorst we already have the current zlib on the master branch. So I have rebased this PR. BTW: for alpine you can use the armv7 package created by the github build action (when it is successfully completed, and within 90 days). |
|
I feel really stupid, where can I find the installation docs? I get |
|
you must install *.spk files (not zip) |
|
alright this is what I tried
version 2
|
|
|
Alright this is what lives in the unpacked zipfile. Did something go wrong? because there is no spk file here. |
|
I have not a clue what's going wrong.
This should work for all archs (I have also validated the armv7-6.1 and armv7-7.0 artifacts) The tree you showed above looks like the content of package.tgz within the spk file. |
|
Wow this is really weird, it must be a mac specific (or my computer specific) issue. When I use the standard macos build in tool to open the zip, it opens to the folder as I described, but when I use a different tool it unzips to the spk file! Thanks for the help! |
|
@RMHogervorst can you please try with the new version? |
|
There might be an issue in the long run with no superuser to do maintainence? |
|
@RMHogervorst do you know what cleanup script/task is run by postgresql? |
|
Not from the top of my head, but I guess this https://www.postgresql.org/docs/14/maintenance.html
I will check the pg_cron table and dig a bit further
21 jan. 2023 20:01:39 hgy59 ***@***.***>:
… @RMHogervorst[https://github.com/RMHogervorst] do you know what cleanup script/task is run by postgresql?
we should disable the pgsql internal cleanup and run a scheduled task in DSM (yes, those task can run scripts with root privileges in DSM 7).
—
Reply to this email directly, view it on GitHub[#4267 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ACIYT6BG2ISYVVPGMXJ2V4TWTQXBFANCNFSM4TXSLHJA].
You are receiving this because you were mentioned.[Tracking afbeelding][https://github.com/notifications/beacon/ACIYT6BMZXWYDJCKNKUX27TWTQXBFA5CNFSM4TXSLHJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOKNT5ARY.gif]
|
|
As far as I can see these are automatic cleanup tasks from the 'Autovacuum Daemon'.
The errors only happen on the system (pg_catalog) tables. so pg_tablespace, db_role_settings, pg_database etc. The settings for this deamon should be in the postgresql.conf file. So, I don't have a clue what is going on here. |
|
Hi, |
There are still issues with cleanup that need to be solved.
timescaledb is not related to this PR (it is a different product/project, not a pgsql extension). |
|
It seems the solution consists to deactivate auto vacuum and to create a DSM task to replace it. If I have some time I will look at it (some useful information are in https://hevodata.com/learn/postgresql-vacuum-command/) |
- Remove keep/delete data option from wizard (DSM 6 doesn't support it, DSM 7 framework handles it automatically) - Add validation to check backup directory exists and is writable - Fix chown group to use dynamic lookup instead of hardcoded value
…plexity - Use scram-sha-256 authentication instead of trust (requires password) - Move Unix socket from /tmp to package var directory for persistence - Add password complexity validation (10+ chars, mixed case, number, special) - Set default admin username to 'pgadmin' - Add PostgreSQL's 63-character username limit
- Use peer auth during initial setup to allow passwordless role creation - After setup, switch to hybrid auth: system user keeps peer (for backups), all other users require scram-sha-256 - Host connections always require scram-sha-256 - Update backup commands to use peer auth (no -h flag)
- Add native/postgresql for pg_config during cross-compilation - Add cross/libgeos (GEOS 3.12.3) - Add cross/libproj (PROJ 8.2.1 - compatible with GCC 8) - Add cross/postgis (PostGIS 3.5.2) - Auto-create PostGIS extension in template1 and postgres databases
- Restore GEOS 3.12.3 (was downgraded to 3.9.6 causing ARMv7 ODR violations) - Add pg_config wrapper for cross-compilation paths - Fix PostGIS configure libpq detection with sed patch - Exclude comcerto2k (GCC 4.9.3 lacks C++14 for GEOS 3.12.3) - Require DSM 7.0+ (GCC 4.9 strict linker fails libpq detection)
This comment was marked as outdated.
This comment was marked as outdated.
|
hey @hgy59, @DigitalBox98 — I’ve done some work to bring this up to date and ready for merging. It now includes the PostGIS Spatial Extension, which appears to load correctly within the database. I’ve also updated the PR description to reflect the current set of commits. I’d really appreciate any review and, if possible, some testing of the code and/or the resulting package. |
|
hey @hgy59, I've been testing this with an updated build of TT-RSS and it seems to be working well. Let me know if there is anything else I should consider before merging. |
|
@mreid-tt what about to build pgsql package for DSM 6.2.4 without postgis/geos? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
We don't need two separate packages. Only one package, but DSM 6 versions without postgis etc. |
- Remove explicit REQUIRED_MIN_DSM and UNSUPPORTED_ARCHS constraints - Only include postgis dependency when TC_GCC >= 5.0 - Make PostGIS extension creation conditional in service-setup.sh - Allows building on older DSM versions (DSM 6.2.4) without PostGIS
Very well, I've added some commits to achieve this. I've also installed on DSM 6.2.4 and ran a few tests which were successful: And also, the manual maintenance tasks from your earlier comments: |
|
hey @hgy59, are there any further actions to be taken before this is approved for merging? |
Nothing comes to mind at the moment. Maybe @DigitalBox98 has some feedback. I might create an OpenStreetMap database on my NAS using this package if I ever find the time... |
|
It’s fine by me. Just wondering what is the SQLite dependency ? |
|
hey @DigitalBox98, here's the details of the SQLite dependency: SQLite Dependency Explanation The Dependency chain: Why libproj needs these dependencies:
PostGIS requires libproj (a cartographic projections library) for coordinate system transformations. libproj uses SQLite for its projection database ( |


Description
This PR adds the PostgreSQL package with significant improvements to security, architecture support, and adds the PostGIS spatial extension.
Motivation: This is a followup of the PR #3826 (fork was deleted)
PostGIS Spatial Extension
Security Improvements
md5toscram-sha-256Architecture Support
Dependencies Added
cross/postgis- PostGIS 3.5.2cross/libgeos- GEOS 3.12.3cross/libproj- PROJ cartographic librarynative/sqlite- Required for PROJ buildChecklist
all-supportedcompleted successfullyType of change