HNHacker News
TopNewBestAskShowJobs

kiwicopple

6,216 karma · joined April 6, 2017

Supabase (YC S20)

copple [at] supabase [dot] io

submissionscomments
kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
fixed - sorry about the confusion.

https://github.com/orioledb/orioledb/pull/558

It is now Apache 2.0 which grants patent rights and can be re-licensed to PostgreSQL when the code is upstreamed. I'll amend the blog to make that clearer.

kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
We are tracking the patches here:

https://www.orioledb.com/docs#patch-set

The actual storage engine is written as an extension - these patches are mostly to improve the TAM API. If these are accepted by the community then it should be simpler for anyone to write their own Storage extensions.

I think (correctly) it will take a lot longer to upstream the extension - the PG community should take a “default no” attitude with big changes like this. Over time we will prove its worthiness (hopefully beyond just supabase - it would be good to collaborate with other Postgres providers)

kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
The current license is PostgreSQL (which is OSI approved)

We could also change to MIT/Apache but we feel PostgreSQL is more appropriate given our intentions to upstream the code

kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
we will have something to announce in this space within a few months

(if the atlasgo team are reading this feel free to reach out too)

kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
Thanks for verifying the benchmarks. We’re close to a full RC, aiming for December

Just to add: if anyone wants to contribute (beyond code) benchmarking and stress-testing is very helpful for us

kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
fwiw, this is not our m.o. - oriole was under development before we took on the maintenance/development.

Our goal now is to ensure that it’s as F/OSS as possible given the pre-existing conditions

kiwicopple··on OrioleDB Patent: now freely available to the Postgres community
(Supabase ceo)

I’ll revisit this with legal to try make it clearer.

Our intentions here are clear - if people have examples that we can follow we will do what we can to make this irrevocable (even to the extent of donating the patent if/when the community are ready to bear the cost of the maintainance)

kiwicopple··on Show HN: OrioleDB Beta12 Features and Benchmarks
We have made our intentions clear with the core team but also haven’t pushed the agenda much - it’s too early.

The conversations we have had so far are promising, we just need to make sure we approach it the right way. Projects like Oriole have started and sputtered out several times (zheap, for example). The burden first lies on our side to prove that we can see it through to GA, with meaningful usage. They (correctly) shouldn’t need to entertain the maintenance burden until they know the juice is worth the squeeze.

If it’s not accepted into core, we will work with cloud providers to add it as a supported extension

kiwicopple··on Show HN: OrioleDB Beta12 Features and Benchmarks
> But I wonder if the core team, which is famously quite conservative about introducing big changes, sees this as too different to adopt as a replacement

we respect the level of conservatism in Postgres and expect that this could take a while to upstream. we're committed to any timeline and we'll develop it for self-hosters and on the supabase platform first to iron out all the bugs

that said, even if it remains an extension that's fine: as long as the TAM patches land upstream this enables everyone to create storage engines using an extension approach - a very "postgres" way of doing things

you can follow the progress of these patches here:

https://www.orioledb.com/docs#patch-set

kiwicopple··on Show HN: OrioleDB Beta12 Features and Benchmarks
we (supabase) are developing an open source vitess adaptation fwiw

https://supabase.com/blog/multigres-vitess-for-postgres

kiwicopple··on Show HN: OrioleDB Beta12 Features and Benchmarks
pgactive uses logical replication so it should be compatible OOTB

one of the possible enhancements Oriole could enable is multi-master (in the presentation here: https://www.orioledb.com/docs#solving-postgresql-wicked-prob...), although that work will come later. The focus for now is getting to GA so that it can be used instead of Heap

kiwicopple··on Show HN: OrioleDB Beta12 Features and Benchmarks
It still requires some patches to the Table Access Method API which have been submitted upstream:

https://www.orioledb.com/docs#patch-set

kiwicopple··on I Dropped the Production Database on a Friday Night
(Supabase ceo)

We do not push devs not to do migrations - we would strongly prefer if everyone used migrations and declarative schemas.

Especially at the scale that OP is at (see maturity model: https://supabase.com/docs/guides/deployment/maturity-model)

kiwicopple··on "I vibe coded and shipped an app in three days. It got hacked. Twice."
> reading my reddit comment about my argument for MCP --read-only

it was great feedback, thank you!

kiwicopple··on "I vibe coded and shipped an app in three days. It got hacked. Twice."
(supabase ceo)

> Supabase's official reply about this question is "I guess you can, but don't worry, RLS."

Here is a more representative view of our official reply:

https://supabase.com/docs/guides/database/hardening-data-api

To avoid both 1 and 2 I would suggest creating a `private` schema. We are now in the planning stages to make this the default

kiwicopple··on "I vibe coded and shipped an app in three days. It got hacked. Twice."
(supabase ceo)

> pushes very hard for RLS to increase adoption by non-technical users

We are tailoring what we're doing for this audience. The challenge is that they appeared out of nowhere about 6 months ago and the LLMs that are used by this audience is trained on 5 years of content tailored for developers

this is not an excuse, I'm just adding color. We've made a lot of changes with tools, alerts, email warnings etc. We are in planning-mode for changing defaults and working with the AI Builder platforms. We will likely change the schema configuration and advocate for Edge Functions (serverside Typescript) where appropriate.

kiwicopple··on Bridged Indexes in OrioleDB: architecture, internals and everyday use?
fwiw I couldn't access your airtable link, but I found this one online:

https://airtable.com/app7jp5t0dEHyDpa8/shr00etqywoDW2N6N

thanks for running the benchmarks, it helps to have external parties verifying the progress

kiwicopple··on PostgreSQL 18 Beta 1 Released
This release includes Asynchronous I/O (AIO):

https://pganalyze.com/blog/postgres-18-async-io

> Postgres has historically operated under a synchronous I/O model, meaning every read request is a blocking system call. The database must pause and wait for the operating system to return the data before continuing.

> Postgres 18 introduces a new configuration parameter: io_method. This setting determines how read operations are dispatched under the hood, and whether they’re handled synchronously, offloaded to I/O workers, or submitted directly to the kernel via io_uring.

This is a big deal - the blog post has benchmarks showing 2-3x improvements

kiwicopple··on Show HN: Pg_CRDT – CRDTs in Postgres Using Automerge
Yes, once this is fully operational the idea would be that it is supported by the client libs or simply by the native libs provided by Automerge (or yjs, in the future)
kiwicopple··on Show HN: Pg_CRDT – CRDTs in Postgres Using Automerge
A couple of years ago we shared[0] an experimental extension for CRDTs in Postgres. This was a good start, but it had a major limitation: CRDTs can be very chatty and so they quickly fill up the WAL.

We just released a new version which solves this problem: https://github.com/supabase/pg_crdt

The new approach uses UNLOGGED tables for documents and logged tables for changes. This enables us to merge changes efficiently in-memory, then persists just the changes directly to the WAL (previously it was sending the entire CRDT).

The new version also takes advantage an advanced in-memory object persistence feature in Postgres called "expanded datum"[1] and some optimizations to this feature that are coming in Postgres 18[2]. This allows for more complex operations without serializing and deserializing the documents between every operation, which gets progressively slower as documents grow.

What is a CRDT? A CRDT (Conflict-free Replicated Data Type) is a data structure that syncs across multiple devices or users. They are used in multi-player applications like Figma and Notion. For example: A shared text editor where multiple people type at once, and everyone sees the same final result without manual conflict resolution.

The end goal here is that you will be able to store CRDTs as a data type in your database, and treat Postgres simply as a "peer". A good example would be storing text for a blog post:

    create table posts (
      id serial primary key,
      title text not null
      content autodoc not null default '{}'
    );
Repo: https://github.com/supabase/pg_crdt

Docs: https://supabase.github.io/pg_crdt/automerge/

----

[0] initial release/discussion: https://news.ycombinator.com/item?id=33931971

[1] expanded datum: https://www.postgresql.org/docs/current/storage-toast.html#S...

[2] PG18 optimizations: https://www.postgresql.org/message-id/3363452.1737483125%40s...

kiwicopple··on Declarative Schemas for simpler database management
yeah, migrations are generated from the Declarative files. For example, the steps are for adding a new column:

1/ Add a new column to the declarative file

2/ Generate a new migration: `supabase db diff -f my_new_migration`

3/ Review/edit the generated migration, check it into git

4/ Apply migration to database

kiwicopple··on Declarative Schemas for simpler database management
> there is no chance I wouldn't inspect and possibly modify the generated "diff" migration

> Of course, you're generally supposed to do that with these tools

this seems to be the crux of the comments - we'll try to make it much clearer than declarative schemas don't skip any migrations/review process, they just provide another way of generating the migrations (note: you can also generate them directly from the database using the CLI)

kiwicopple··on Declarative Schemas for simpler database management
> doing this but better

I'm curious what makes it better than the approach in the blog?

If it's this:

> also maintains a schema.sql file that can be loaded as a one-off

That's exactly what the declarative files provide

kiwicopple··on Declarative Schemas for simpler database management
It is raw sql. The update here is more of a "workflow" change.

In the past we only offered tools to create a sql migration to make a change to your database. Now you can write the state of your database into files, then the migration is generated for you.

This is very similar to something like Rails/Phoenix/whatever, where you write your models and then it generates a change. The difference is that here you write your models in raw SQL, rather than an ORM

kiwicopple··on Declarative Schemas for simpler database management
> db engineers approve the generated migration script

yeah - this is definitely the intended flow here. We won't be recommending anyone blindly applying generated migrations.

As you mention, it is expected that you generate & review on your local development machine, check into source control, push & merge. We've also been using this internally for ~2 years now and it works great

kiwicopple··on Declarative Schemas for simpler database management
yes, you can edit the migrations. The steps are for adding a new column, for example:

1/ Add a new column to the declarative file

2/ Generate a new migration: `supabase db diff -f my_new_migration`

3/ Review/edit the generated migration

Docs are here:

https://supabase.com/docs/guides/local-development/declarati...

kiwicopple··on Declarative Schemas for simpler database management
Combining this with the Postgres Language Server that was released this week, you can now execute statements directly within your IDE:

https://x.com/psteinroe/status/1907803477939527728

kiwicopple··on Supabase UI Library
[supabase ceo]

Despite the title "UI library", this is more like a "component registry" for developers to bootstrap their applications and it will work for everything from Web & Mobile, to database scaffolding. Perhaps some poor naming/positioning on our part.

If you aren't familiar with shadcn, it works by dumping a bunch of files into your application which you can modify at your leisure. This is a different from something the "Bootstrap" approach where you could only do minimal tweaks to the theming.

kiwicopple··on Postgres Language Server: Initial Release
For those who don’t read the blog post, I thought this was pretty cool:

> The idea to use tree-sitter in addition to libpg_query came from feedback[0] on our previous HN post, so thank you for that

https://news.ycombinator.com/item?id=38570680

kiwicopple··on Making Postgres scale
> Supabase comes really close, but has been much more difficult in actual use

supabase team here - can you share more about the challenges? We'd love your feedback so that we can fix any difficulties for the future

← PreviousPage 2 of 33Next →