PostgreSQL grew out of the POSTGRES project at the University of California, Berkeley, led by Michael Stonebraker in the 1980s, and took its current name in 1996. It’s developed by an independent community rather than owned by a single company.
What sets PostgreSQL apart
- JSONB: JSON stored in a binary form you can index and query.
- Extensions: such as PostGIS for geographic data and pgvector for vector search in RAG apps.
- Advanced types: arrays, ranges and custom types.
- MVCC: reads don’t block writes, which suits concurrent workloads.
Quick comparison with MySQL
| Area | PostgreSQL | MySQL / MariaDB |
|---|---|---|
| Default port | 5432 | 3306 |
| Command-line client | psql |
mysql |
| Auto-increment | GENERATED AS IDENTITY or SERIAL |
AUTO_INCREMENT |
| Case-insensitive search | ILIKE |
LIKE with a _ci collation |
| Typical apps | Django, Rails, data apps | WordPress and most PHP scripts |
Example
CREATE TABLE products (
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
name TEXT NOT NULL,
attrs JSONB
);
SELECT name FROM products WHERE attrs->>'color' = 'red';
The ->> operator reads a value out of a JSONB field as text, and you can index it to speed up searches.
Common mix-ups
- The application decides the database: WordPress and most ready-made PHP scripts need MySQL/MariaDB and won’t run on PostgreSQL.
- An ORM isn’t full portability: Django, Laravel and Prisma support both, but raw queries and features like JSONB don’t move over as-is.
- Managed services: cloud PostgreSQL services run the same PostgreSQL and handle upgrades and backups for you.
On ArabyHost
ArabyHost doesn’t offer a PostgreSQL database per account; the databases on our hosting plans are MySQL/MariaDB. If your Django or Laravel project doesn’t depend on Postgres-only features, you can run it on MySQL by changing the connection settings. If it genuinely needs PostgreSQL, use an external managed PostgreSQL service and check with support that your account can reach it. There’s no root access and no VPS yet (it’s planned), so you can’t install PostgreSQL yourself on the hosting.
FAQ
Which is better, PostgreSQL or MySQL?
Neither wins outright. PostgreSQL is stronger for complex queries and advanced types; MySQL/MariaDB is more common on hosting and simpler for PHP apps such as WordPress.
Does WordPress run on PostgreSQL?
Not officially: WordPress is built for MySQL/MariaDB. There are plugin-based attempts, but they aren't suitable for a production site.
Can I move a Django project from PostgreSQL to MySQL?
Usually, if it doesn't rely on Postgres-only features such as ArrayField. Change the DATABASES setting, run migrate, then move the data with dumpdata and loaddata.