Mindblown: a blog about philosophy.
-
2025/07/11 [GADM-api]
I am working on a rate limiter for access tokens. I am planning to allow up to 10 requests per second, similarly as geocode-earth do. I need to redo a part of the caching mechanism I wrote yesterday.
-
2025/07/10 [GADM-api]
I continue working on access token mechanism. I have a Postgres table ready for storing the tokens, also a in memory hash-map that stores recently used tokens is already implemented. Next step will be to apply a simple rate limiting mechanism.
-
2025/07/10 [Learn Postgres]
[Book “Learn PostgreSQL”] Postgres stores configuration across several files – posgresql.conf, postgressql.auto.conf and pg_hba.conf. You can extend settings with additional configuration files, this allows to organize settings by topic – use include_file, include_dir or include_if_exists directives. You can inspect settings using SHOW command or by querying pg_setting catalog.Each configuration belongs to a context which defines…
-
2025/07/09 [Learn Postgres]
[Book “Learn PostgreSQL”] I completed the chapter about physical backups. They are performed by coping PGDATA, tablespaces and WALs to another machine or different directory. You can leverage a buid-in postgres command pg_basebackup or 3rd party tool pgBackRest. Physical backups require careful approach to configuration e.g. connections values and hba rules. Point in time recovery is…
-
2025/07/09 [GADM-api]
[GADM-api] I started working on access_token middleware validation. I will create simple caching mechanism leveraging a map guarded with a mutex. It needs to feature a rate limiting system – I will start working on it tomorrow.
-
2025/07/08 [GADM-api]
I arrived with working script for setting up the initial database. The script creates new database, sets up appropriate roles, schemas and permissions, then test them and rolls back changes done by the tests. As the final step the script ingest GADM geopackage to appropriate schema. Additionally, I ensured that migrations created with goose package…
-
2025/07/08 [Learn Postgres]
Postgres is equipped in three tools designated to handle logical backups: pg_dump, pg_dumpall and pg_restore. They offer rich customization for text and binary backups that can copy selected database objects. Dumping and restoring database can be performed by parallel workers to decrease operation time. The COPY and the native Postgres \copy commands allow integrating backup…
-
2025/07/07 [GADM-api]
I continue working on database initialization scripts. I’ve done good progress on setting up roles and privileges.
-
2025/07/07 [Learn Postgres]
Backup & Restoration – Postgres supports two types of backups – logical and physical. Logical backup copies table by table as if any client performing series of SELECT statements. It is a reliable and simple method that works across major versions. However it takes more time and puts additional cpu and memory strain on the…
-
2025/07/06 [GADM-api]
I started this day from researching postgres migration tools for golang. I decided to use goose package for the sake of it’s simplicity. I am also working on endpoint authorization. I am planing to create a table for access tokens with default UUIDv4 value and an index for fast retrieval. In the future I should…
Got any book recommendations?