Monday, 30 November 2026

Ciphertext Indistinguishability

Worth understanding in-depth - used in classifying security algorithms. 

There are various formal definitions e.g. IND-CPA, each of which must be understood in depth.

IND-CPA, incidentally, stands for indistinguishability under chosen plaintext attack.

A Closer Look at ArangoDB

ArangoDB (a graph database system developed by Arango Inc) is another contender for the AI agent "context of choice".

A Closer Look at ArcadeDB

ArcadeDB styles itself as "The context layer from AI agents" and it has good rationale for doing so. Structurally it is an "Open Source Multi-Model Graph Database" which is in fact what agents need.

Founder Luca Garulli has written a number of articles on ArcadeDB.

Open Source Graph Databases for AI

Some open source graph alternatives are:

ArcadeDB, Memgraph, FalkorDB, ArangoDB, HugeGraph, and LadybugDB

Some of these are multi-model database management systems, which means they support graphs as well as other formats.

Commercial alternatives include Neo4J. However, open source graphs also have commercial dimensions, for example support subscriptions with defined service level agreements.

Consistency across data models is one compelling reason to use a multi-model database. A reason not to would be single vendor lock in (SVLI), and the more dangerous form single obscure vendor lock in (SOVLI).

SurrealDB is another challenger in the AI agent context space. It is also open source and in Rust.

Sunday, 29 November 2026

Roles in Postgres

CREATE ROLE defines a new database role in Postgres. Its syntax is:

CREATE ROLE name  [ [WITH]  option  [..] ]

This creates a new role to a PostgreSQL database cluster. 

A role is an entity that can own database objects and have database privileges; a role can be considered a "user" or a "group" depending on how it is used.

Roles can grant permissions to other roles.

The following sections of the PostgreSQL manual should be read in conjunction with CREATE ROLE documentation.

Saturday, 28 November 2026

Creating your First User in Postgres

In Linux, become the postgres user to create new users.

sudo -u postgres psql

Means run psql as the postgres user (the primordial Postgres user).

Once the interactive command line appears you can review the users with \du.  This will show a role (under Role name) entitled postgres, a list of role attributes alongside e.g Superuser, Create role, Create DB, Replication and Bypass RLS.

Do \q to quite psql.

Postgres Fundamentals

PostgresSQL uses a client/server model. 

A Postgres session consists of the following cooperating processes; a server process manging database files, accepting connections to the database from client applications, and performing database actions on behalf of clients. The database server program is called Postgres. The user's client program talks to Postgres and instructs actions to be performed on the database.

If client and server are on different hosts, they communicate using TCP/IP.

The Postgres server can handle multiple connections from clients, in which case it forks a new process for each connection. The supervisor server process is always running, whereas client and associate server processes come and go.

A Postgres user account is needed to create a new database in Postgres. This requires the right role to be assigned otherwise a createdb requests will end with "role \"xyz\" does not exist".