News for hackers. Stuff that matters.

zombodb

Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @02:32PM (#49769021)
> Your only duty is to abide by the license.

We live in a society. I don’t see any harm in believing we ought to be respectful of the work. That’s all I’m saying. You don’t have to be, but it’s a better world if you are.

> If you want to enforce that everything built on top of a particular open source package also be open source, that belongs in the license.

Yes! I fully agree. The one that creates the thing is the one that gets to choose its license.

Having opened-sourced some bit of work myself, that’s a very difficult decision.

Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @01:49PM (#49768659)
Over Postgres' FTS, TIN provides at least:

  - superior performance
  - superior operational overhead
  - no second copy of data in tsvector form
  - BM25 scoring support with optimized top-k output
  - runtime configurable scoring knobs
  - expression-attached score boosting
  - sophisticated span query support -- this is proximity search on steroids (https://github.com/planetscale/lead/tree/main/tinql/docs)
  - lossless term positions
  - index-answerable negative expressions (find all docs that don't contain a word)
  - full document hit highlighting
  - optimized exact `count(\*)`
  - term expansion via any of fuzzy matching, wildcards, regular expressions, and dictionary ranges
  - intentionally smaller user-facing SQL API surface
There's a lot we didn't cover in the announcement blog. I'm sure we'll do more as time goes on.

As an aside, something I personally think is cool, and I suppose you can do this with Postgres' built-in `@@` too, is that you can use TIN's full query language (linked above) against any text datum. This is a valid query:

  SELECT pid, query 
  FROM pg_stat_activity 
  WHERE query ==> 'select OR copy'
in other words, you don't need an index at all to use TIN's full query language against any text field in any query.
Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @12:54PM (#49768134)
I thought I was clear:

> When one develops using open-source software they have an obligation to follow the licenses.

Obviously what follows from one of those licenses is what you say.

I’m glad we agree!

Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @12:42PM (#49768013)
It’s clear that we’re on opposite ends of open-source ideology.

Good luck out there! 2026 is wild times!!

Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @12:24PM (#49767843)
When one develops using open-source software they have an obligation to follow the licenses. They also have a moral obligation to be respectful of the work upon which they’re building. And they have a social obligation to help improve that software where they can.

Those that develop on top of open-source have no obligation to give you their work for free.

You’d be surprised as to the amount of open-source contributions TIN drove towards Postgres, LLVM, and pgrx. And you’d be speechless at the amount of upstream work across all sorts of open-source PlanetScale does. Postgres 18.6, for example, is better for you today, in part, because of TIN. You’re welcome.

Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @11:50AM (#49767549)
Why don’t you like Postgres’ license? It’s as permissive as a license gets.
Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @11:44AM (#49767486)
They also end up with all the infrastructure and processes necessary to keep the external search system in sync, resync/reindex, pkey shipping back to their source of truth in queries, application-side joins and enrichment between both sources. It’s brutal.

Having everything in one place eliminates entire classes of development and especially operational problems.

Re:Tin: full-text search for Postgres on Saturday September 19, 2026 @11:32AM (#49767391)
I’m one of TIN’s developers and if you google my username you’ll see I’ve been in this space for a long time.

The answer to your first question is simply: yes

As far as your second question, what customization do you need that you believe TIN or PlanetScale doesn’t provide? These are things we can do, with alacrity.

Re: on Monday July 21, 2025 @08:53PM (#44642158)
Shout out to grapeseed oil
Re:Building a Managed Postgres Service in Rust on Monday April 08, 2024 @01:33PM (#39971946)
Yup. Just under a 501c3 to help ensure pgrx outlives us.

Huge thanks to TCDI (www.tcdi.com) for continuing to fund development.

Re:Introducing pgzx: create PostgreSQL extensions using Zig on Thursday March 21, 2024 @01:11PM (#39781421)
Y'all have built something cool. I'm excited to see where it goes from here.

If there's anything the pgrx team can do to help, just let us know.

Re:Introducing pgzx: create PostgreSQL extensions using Zig on Thursday March 21, 2024 @01:00PM (#39781246)
If you build it, they'll come. The only limit is yourself!
Re:Postgres: Extensions Shape the Future [pdf] on Saturday November 25, 2023 @11:57PM (#38419277)
Nice deck, Ryan! And thanks for the mentions. ;)
Re:Postgres: The Next Generation on Tuesday October 10, 2023 @08:24PM (#37839522)
I think maybe what you’re really looking for are the files here: https://github.com/pgcentralfoundation/pgrx/tree/c2eac033856...

Those are the internals we currently expose as unsafe “sys” bindings.

As we/contributors identify more that are desired we add them.

pgrx’ focus is on providing safe wrappers and general interfaces to the Postgres internals, which is the bulk of our work and is what will take many years.

As unsafe bindings go, we could just expose everything, and likely eventually will. There’s just some practical management concerns around doing that without a better namespace organization —- something we’ve been working.

The Postgres sources are not small. They are very complex, inconsistent in places, and often follow patterns that are specific to Postgres and not easy to generalize.

If you’ve never built an extension with pgrx, give it a shot one afternoon. It’s very exciting to see your own code running in your database.

Re:Postgres: The Next Generation on Tuesday October 10, 2023 @07:28PM (#37839101)
I don’t think we even expose the TableAM APIs? They are incredibly hard to generate bindings for from the C headers — lots of inline functions and complex #define macros.

We have an ambitious goal with pgrx and it’s going to take many years and countless hours of developer effort to get there.

It can, however, serve as a way for newcomers to gain experience with Postgres internals.

Regarding the TableAM specifically, when we are able to create a safe Rust wrapper around it, that wrapper will be documented.

Re:Pg_bm25: Elastic-Quality Full Text Search Inside Postgres on Sunday October 08, 2023 @06:40PM (#37815062)
Thank you. I’ll pass this on to the team.
If you’re aware of bugs that fall within plrust’s domain we’d appreciate any and all reports via GitHub!
Always nice to see pgx being used in the wild! Awesome work.
I don’t pay any attention to what the cloud providers are doing. I have no control over them so….. eh.

ZDB is still alive and well but I have a real job now too.

I can definitely reword that if it's confusing.
> Doing so would require ElasticSearch to reach consensus on every read/write

ZomboDB only requires that ES have a view of its index that's consistent with the active Postgres transaction snapshot. ZDB handles this by ensuring that the ES index is fully refreshed after writes.

This doesn't necessarily make ZDB great for high-update loads, but that's not ZDB's target usage.

> They also claim that transactions will abort if ElasticSearch runs into network trouble...

I had to search my own repo to see where I make this claim. I don't. I do note that network failures between PG & ES will cause the active Postgres xact to abort. On top of that, any error that ES is capable of reporting back to the client will cause the PG xact to abort -- ensuring consistency between the two.

Because the ES index is properly refreshed as it relates to the active Postgres transaction, all of ES' aggregate search functions are capable of providing proper MVCC-correct results, using the parallelism provided by the ES cluster.

I don't have the time to detail everything that ZDB does to project Postgres xact snapshots on top of ES, but the above two points are the easy ones to solve.

I wonder what the ZomboDB developers are up to now? What great text-search-in-postgres things could they be secretly working on?
Re:PGX: Write Postgres extensions in Rust instead of C on Monday July 13, 2020 @09:29PM (#23827602)
I'd be inclined to agree.

That said, it'd be easy to prototype with pgx, assuming that compression library exists in the Rust ecosystem too?

Re:PGX: Write Postgres extensions in Rust instead of C on Monday July 13, 2020 @09:25PM (#23827581)
I've noodled the idea of a pl/pg_rust, but the whole "Cargo.toml" and downloading dependencies from the internet seems bad.

I see what you're saying about no_std tho. Could be doable.

Re:PGX: Write Postgres extensions in Rust instead of C on Monday July 13, 2020 @05:57PM (#23826027)
That is interesting.

pgx does a lot of that too, but for only pg10/11/12. And then it post-processes the bindings and builds a "common.rs" for symbols that are identical across versions.

That way you can target all three versions at once, and then you can use Rust's #[cfg(feature=)] directive to opt into support for specific versions.

pgx has also done a little bit of work to mask differences between the three versions so they appear as part of "common.rs" anyways.

I wanted a framework that let me know, at development time, if I was trying to do a thing that isn't supported (or the same) across various PG versions.

Re:PGX: Write Postgres extensions in Rust instead of C on Monday July 13, 2020 @05:20PM (#23825701)
blush
Re:PGX: Write Postgres extensions in Rust instead of C on Monday July 13, 2020 @05:13PM (#23825648)
Sure! Top is Postgres, bottom is pgx, after running each 5 times...

    test=# SELECT count(*) FROM (SELECT generate_series(1, 10000000)) s;
      count   
    ----------
     10000000
    (1 row)

    Time: 399.630 ms
    test=# SELECT count(*) FROM (SELECT srf.generate_series(1, 10000000)) s;
      count   
    ----------
     10000000
    (1 row)

    Time: 478.194 ms

Thanks for the reply. I'm not surprised there's room for optimization in pgx, especially in the Iterator-->SRF path.

edit: PS, thanks for the idea of putting what I assume is the backend pid in psql's prompt. I need to go figure out how to do that right now!

edit edit: hmm, I guess that's not the PID.

Re:PGX: Write Postgres extensions in Rust instead of C on Monday July 13, 2020 @04:20PM (#23825169)
Yes there is. It's not documented/example'd yet tho.

There's a derive macro called #[derive(PostgresType)]. Combine that with serde's Serialize, Deserialize, and you're gtg.

I'm going to be working on more docs and twitch streams over this week.

Older »