Codewerk
pg config tune
Implements the PGTune rules of thumb exactly as in PGTune (MIT, https://github.com/le0pard/pgtune, configurationSelectors.js at commit f740af00, 2026-10-30): shared_buffers RAM/4 (desktop RAM/16), effective_cache_size RAM*3/4, maintenance_work_mem RAM/16 (dw RAM/8, capped), wal_buffers like wal_buffers=-1, work_mem from (RAM - shared_buffers) / ((max_connections + parallel workers) * 3) with workload factors and a 4MB floor, random_page_cost and effective_io_concurrency by storage, parallel.
POST https://code.halowerk.com/v1/pg-config-tuneInputs
| Field | Type | Required | Description |
|---|---|---|---|
| total_memory | integer | Yes | Total RAM of the database server in memory_unit. |
| memory_unit | string | No | |
| cpus | integer | No | CPU cores; parallel settings need at least 4. |
| connections | integer | No | Expected max_connections; derived from the workload if omitted. |
| db_version | integer | No | |
| os | string | No | |
| workload | string | No | |
| storage | string | No | |
| data_size | string | No | Database size compared with RAM (mid_ram = 1x-3x RAM). |
| current_config | string | No | Optional current postgresql.conf for a diff. |
Show full input schema
{
"type": "object",
"additionalProperties": false,
"required": [
"total_memory"
],
"properties": {
"total_memory": {
"type": "integer",
"minimum": 1,
"maximum": 999999,
"description": "Total RAM of the database server in memory_unit."
},
"memory_unit": {
"type": "string",
"enum": [
"MB",
"GB",
"TB"
],
"default": "GB"
},
"cpus": {
"type": "integer",
"minimum": 1,
"maximum": 999999,
"description": "CPU cores; parallel settings need at least 4."
},
"connections": {
"type": "integer",
"minimum": 20,
"maximum": 260000,
"description": "Expected max_connections; derived from the workload if omitted."
},
"db_version": {
"type": "integer",
"minimum": 10,
"maximum": 19,
"default": 18
},
"os": {
"type": "string",
"enum": [
"linux",
"windows",
"mac"
],
"default": "linux"
},
"workload": {
"type": "string",
"enum": [
"web",
"oltp",
"dw",
"desktop",
"mixed"
],
"default": "web"
},
"storage": {
"type": "string",
"enum": [
"ssd",
"hdd",
"san",
"nvme"
],
"default": "ssd"
},
"data_size": {
"type": "string",
"enum": [
"less_ram",
"mid_ram",
"greater_ram"
],
"default": "mid_ram",
"description": "Database size compared with RAM (mid_ram = 1x-3x RAM)."
},
"current_config": {
"type": "string",
"maxLength": 500000,
"description": "Optional current postgresql.conf for a diff."
}
}
}Published input example
{
"total_memory": 16,
"cpus": 8,
"db_version": 18,
"workload": "web",
"storage": "ssd"
}Result & documentation
Machine-readable documentation of this hub
Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.
More endpoints in this hub
- Codewerk0.003 USDC
action sha pin
POSThttps://code.halowerk.com/v1/action-sha-pinFinds every "uses: owner/repo[/path]@ref" in a GitHub Actions workflow, resolves tags (including annotated tags) and branches to the commit SHA with git ls-remote against github.com, and rewrites the line to "uses: owner/repo[/path]@<sha> #
- Codewerk0.003 USDC
actionlint
POSThttps://code.halowerk.com/v1/actionlintRuns the official statically linked actionlint 1.7.12 release binary (MIT, SHA-256 checked against the published checksums) in an isolated child process without network, with the bundled ShellCheck 0.11.0 for run: scripts (pyflakes is not a
- Codewerk0.004 USDC
api changelog
POSThttps://code.halowerk.com/v1/api-changelogCompares operations, parameters, request bodies, response codes and media types, component schemas (one property level), servers and security schemes of two documents (Swagger 2.0 is converted with swagger2openapi first; 3.0 and 3.1 are rea