15 comments

  • kfk 7 hours ago
    Have you considered other data sources? The idea is solid, I design Enterprise data warehouses for a living and with AI I have been wondering what's going to be next. Redshift/Snowflake, etc., have their pros but they don't come with predefined ingestion and access control.

    Another question, how do you scale duckdb to multi user reads? I guess for you it's 1 file behind a node service? A typical data warehouse could have 1,000 concurrent users on a Monday morning.

    And any thoughts on temporary access tokens for odbc? A la https://medium.com/@shashwat_singh/hashicorp-vaults-dynamic-.... This is because I would rather not give any real password to AI agents.

    • tagspace 5 hours ago
      hey kfk. Yeah, we've definitely been thinking about the potential for other datasources. E.g. we already have use-cases internally where being able to ingest from clickhouse, SQS and S3 would be big wins. Do you have particular sources in mind?

      Great question about scalability. Mason right now has really been built for the BI use case, where you have lots of sporadic adhoc queries. It does this really well by dedicating every CPU to every query as it comes in, so it responds as quickly as possible. But, internally we also deal with lots of customer-facing analytics usecases, which is more like the case you describe: 1,000 concurrent users accessing a dashboard concurrently. For that case, the easiest thing to do is to simply give your machine more CPU and RAM (that will get to surprisingly far), but then beyond that we'd need to allow scaling the Mason readers horizontally. Definitely something we're going to look into.

      ODBC is an interesting use-case. Not something we come across alot. Can i ask what your use-cases are there?

  • hum3hum3 20 hours ago
    I did something sort of similar which is to rewrite postgres so that I could use it against a single file sqlite DB and run in a browser with WASM. https://github.com/drummonds/go-postgres
  • aleda145 18 hours ago
    Cool! DuckDB is awesome

    I'm very curious with the use case, why do you need to run analytical queries against the postgres read replica? Why not read the WAL and CDC them elsewhere? Especially if it's adhoc then the (short) delay wouldn't be noticeable.

    Also did you tried transpiling SQL if you wanted to match the postgres dialect? I've had great success with duckdb <=> postgres using https://github.com/tobilg/polyglot

    • NewJazz 18 hours ago
      Sounds like they saw clickhouse as too operationally cumbersome and too much of a shift for their use cases. They seemed to want to reuse existing sql queries or fragments and just get a performance boost, and then also easy spin up these analytical DBs in customer environments on an ad-hoc basis.
      • tagspace 17 hours ago
        Yeah, exactly. Our customers have lots of postgres dbs, and we needed something plug and play that we can throw the existing (postgres) queries at, without having to rewrite them. Also saves setting up a warehouse each time.

        And yeah, it uses CDC via the WAL if you sync via logical replication.

        • aleda145 16 hours ago
          Ah a fleet of customer postgres dbs! Makes sense, thanks for taking the time to explain
  • guy_louzon 2 hours ago
    Sounds cool. so basically you created a PostgreSQL compatible layer on columnar db so any software on top it is "mostly" indifferent ?
    • tagspace 1 hour ago
      Exactly. Any tool that can talk to postgres can talk to it.
  • nylonstrung 19 hours ago
    Outside of the dashboard and team features stuff what does this add over just DuckDB + ADBC connected to postgres?

    Is pglite and the node stuff even necessary here?

    • tagspace 19 hours ago
      Good question. The majority of the work was two things:

      1. the replication logic that keeps duckdb in sync with your postgres (like you'd expect from a read replica)

      2. the query rewriter that takes incoming postgres queries and turns them into queries that run fast on duckdb (we've spent a lot of time making sure that most queries are answered in a few 100 milliseconds, even on 10+M rows).

      So, I guess the main differences are:

      - with ADBC the load still hits your postgres (which is what we wanted to avoid)

      - with ADBC you're not guaranteed to get the same answer as postgres (we want confidence that our queries will answer the same, not faster but different)

      - you'd have to build your own ETL (if you want to avoid the load on your postgres)

      Does that make sense?

  • pratikgcet1985 15 hours ago
    This is really good! We are an avid user of ClickHouse and this is awesome work.
  • aiexplore369 8 hours ago
    this seems to be promising with clickhouse great work !keep t rolling !
  • alex_hirner 16 hours ago
    Can replicated tables live on s3/parquet only, as in did you try so?
    • tagspace 16 hours ago
      Haven't tried it to be honest. Currently very lightweight and just syncs directly to the disk where you run it.

      But duckdb supports both S3 and parquet so would likely be easy to support.

      What's the usecase, if you don't mind me asking?

      I guess the advantage is lower storage costs, but the read latency would take a hit (which would definitely affect query speeds). Would be interesting to try.

  • neilsimp1 16 hours ago
    There are too many software projects with this name.
    • akshay180 16 hours ago
      I have too many friends with this name
      • rightisleft 13 hours ago
        There are too many software projects…
  • richardmeng 20 hours ago
    Very cool.
  • Nate007 6 hours ago
    [flagged]
  • ticktockten 16 hours ago
    [flagged]
  • velocitixagency 20 hours ago
    [flagged]
  • bhavin_ 10 hours ago
    [dead]
  • sick_of_slop 19 hours ago
    [dead]