<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PostgreSQL on Artur Rios Lab</title><link>https://lab.artur-rios.tech/tags/postgresql/</link><description>Recent content in PostgreSQL on Artur Rios Lab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 22 Oct 2026 12:30:00 +0000</lastBuildDate><atom:link href="https://lab.artur-rios.tech/tags/postgresql/index.xml" rel="self" type="application/rss+xml"/><item><title>Netbank: A Banking System to Learn From</title><link>https://lab.artur-rios.tech/brainstorms/netbank/</link><pubDate>Thu, 22 Oct 2026 12:30:00 +0000</pubDate><guid>https://lab.artur-rios.tech/brainstorms/netbank/</guid><description>&lt;p&gt;A complete banking system, built for learning purposes.&lt;/p&gt;&#10;&lt;h2 id="technology"&gt;Technology&lt;a class="heading-anchor" href="#technology" aria-label="Link to this section"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;.NET on the back end&lt;/li&gt;&#10;&lt;li&gt;Flutter on the front end&lt;/li&gt;&#10;&lt;li&gt;Heimdall for authentication and authorization&lt;/li&gt;&#10;&lt;li&gt;PostgreSQL database&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="platforms"&gt;Platforms&lt;a class="heading-anchor" href="#platforms" aria-label="Link to this section"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Android&lt;/li&gt;&#10;&lt;li&gt;Linux&lt;/li&gt;&#10;&lt;li&gt;Windows&lt;/li&gt;&#10;&lt;li&gt;Web&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="what-a-complete-bank-covers"&gt;What a complete bank covers&lt;a class="heading-anchor" href="#what-a-complete-bank-covers" aria-label="Link to this section"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&amp;ldquo;Complete&amp;rdquo; is the part of the idea that needs a boundary. A real bank is&#10;hundreds of systems, so this is a suggestion of what Netbank should cover, chosen&#10;because each part teaches something a CRUD app does not. It moves no real money&#10;and connects to no real bank: every institution outside Netbank is simulated.&lt;/p&gt;</description></item><item><title>Sizing the Server</title><link>https://lab.artur-rios.tech/infrastructure/infrastructure-sizing/</link><pubDate>Wed, 21 Oct 2026 17:55:00 +0000</pubDate><guid>https://lab.artur-rios.tech/infrastructure/infrastructure-sizing/</guid><description>&lt;p&gt;Before an application goes on &lt;a href="https://lab.artur-rios.tech/infrastructure/infrastructure-server/"&gt;the server&lt;/a&gt;,&#10;it should be clear that it fits. This is the model I size the server with: one&#10;figure per service for what it needs, a formula that adds headroom, and the&#10;signals that say the model has stopped being true.&lt;/p&gt;&#10;&lt;p&gt;The figures are &lt;strong&gt;starting estimates&lt;/strong&gt; for a small production load, a few&#10;requests a second on each API, not measurements. After a week of real traffic,&#10;Grafana&amp;rsquo;s numbers replace them.&lt;/p&gt;</description></item><item><title>The Server</title><link>https://lab.artur-rios.tech/infrastructure/infrastructure-server/</link><pubDate>Wed, 21 Oct 2026 17:55:00 +0000</pubDate><guid>https://lab.artur-rios.tech/infrastructure/infrastructure-server/</guid><description>&lt;p&gt;Everything self-hosted runs on one machine: the platform, the deploy server,&#10;and every application in three environments. This part covers the machine&#10;itself and what is installed on it directly, outside any container.&lt;/p&gt;&#10;&lt;h2 id="the-machine"&gt;The machine&lt;a class="heading-anchor" href="#the-machine" aria-label="Link to this section"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Resource&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Spec&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Provider&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Hostinger VPS&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;vCPU&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;4 cores&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;RAM&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;16 GB&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Disk&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;200 GB NVMe&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Bandwidth&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;16 TB a month&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OS&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Ubuntu LTS&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;One machine is a single point of failure, and I accept that knowingly: these&#10;are my own projects, an outage costs me an evening, and one well-understood&#10;server is easier to keep healthy than three. Whether everything fits on it is&#10;the subject of &lt;a href="https://lab.artur-rios.tech/infrastructure/infrastructure-sizing/"&gt;Sizing the Server&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Web APIs</title><link>https://lab.artur-rios.tech/infrastructure/infrastructure-web-apis/</link><pubDate>Wed, 21 Oct 2026 17:55:00 +0000</pubDate><guid>https://lab.artur-rios.tech/infrastructure/infrastructure-web-apis/</guid><description>&lt;p&gt;My backends are ASP.NET Core APIs, and every one of them meets the platform the&#10;same way. Heimdall&amp;rsquo;s API is the example throughout; Fortuna&amp;rsquo;s follows the same&#10;shape.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Concern&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Choice&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Framework&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;ASP.NET Core on .NET 10&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Image&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Multi-stage: the SDK to build, the ASP.NET runtime to run&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Database&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The host&amp;rsquo;s PostgreSQL, one database per environment&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Configuration&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Environment variables, from yggdrasil&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Health&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;/healthcheck&lt;/code&gt;, probed by Docker, yggdrasil and the status API&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Metrics&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;OpenTelemetry&amp;rsquo;s Prometheus exporter, on port 9464&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Logs&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Standard output, shipped to Loki&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Checks&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tests and a Docker build in GitHub Actions&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;h2 id="the-image"&gt;The image&lt;a class="heading-anchor" href="#the-image" aria-label="Link to this section"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The Dockerfile has two stages. The first restores and publishes with the .NET&#10;10 SDK, copying the project files before the sources so a source-only change&#10;reuses the cached restore. The second copies the output onto the much smaller&#10;ASP.NET runtime image, and runs it as the image&amp;rsquo;s own non-root user:&lt;/p&gt;</description></item></channel></rss>