Category: Thread
-
2025/07/13 [Learn Postgres]
Physical replication relies on the concept of streaming WAL segments from primary node to a replica node. The replica is in the state of continuous recovery – it continuously execute WAL segments received from primary node.In Synchronous replication primary node ensures replica received WAL segments before completion, while in asynchronous mode WAL segments are streamed…
-
2025/07/12
Still working on a rate limiter. I think I am getting there. This will be a good moment to introduce unit tests.
-
2025/07/12 [Learn Postgres]
I was mainly writing down notes about Postgres configuration. I have started reading about physical replication but I will include the notes about this chapter later.
-
2025/07/11 [Learn Postgres]
I completed the configuration & monitoring chapter. Postgres allows configuration modifications while cluster runs by means of ALTER SYSTEM command. Modifications applied this way will be appended to postgresql.auto.conf file.You can use configuration generators like PgConfig with simple GUI interface.Information about running queries, sessions and backend processes can be read from pg_stat_activity catalog. Information about…
-
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…