I haven’t looked at the code too much(yet). I’d be curious to know how you’re handling some of the more wiry edge cases when it comes to following foreign key constraints. Things like circular dependencies come to mind. As well as complex joins.
I feel ok posting this because it’s archived, but this problem is basically what we designed for with Neosync [1].
It was probably the hardest feature to fully solve for the customers that needed it the most, which were the ones with the most complex data sets and foreign key dependencies.
To the point where it was almost impossible to do this, at least with syncing it directly to another Postgres database with everything in tact. Meaning that if on the other side you want another pg database that has all of the same constraints, it is difficult to ensure you got the full sliced dataset. At least the way we were thinking about it.
that is a valid point. dbslice finds cycles in the fk graph and usually resolves them by nulling a nullable fk for insert order, then patching it back with deferred updates after inserts. if a cycle has no nullable fks, postgres output can still work when deferred fk checking is enabled and the cycle constraints are deferrable, otherwise it fails fast with a clear error.
traversal automatically pulls in parent records so you don’t end up with dangling references, and a validator (enabled by default) can double-check the slice before output. for complex joins, you can opt into subqueries in seed where clauses.
it covers a lot of messy cases, but i won’t claim it’s fully solved yet. there’s no automatic discovery of relationships that only exist in app code (beyond heuristic hints), and real production schemas will still surface new edge cases. it’s still early-stage, so the more people test it on messy production-like datasets, the faster i can iron those out.
i would also love to hear what you think of the implementation if you check out the code.
Like many I installed omz and ran it as the default for a long time. After a while I looked to optimize my shell starts and realized I was only using a fraction of the functionality.
So I figured out what I was using and created my own very paired down version of what I needed. My boot times are much faster and I’ve been totally happy with it. I also learned a lot more about shell configs as a result.
Are you sure you're not thinking of "SmartDay" days that are part of the SmartRate program?
Flex Alerts are CAISO and ultimately about grid stability. SmartRate/SmartDay are ultimately about marginal cost of production on PG&E. The two are certainly correlated -- at the very least, a Flex Alert day is almost guaranteed to be a SmartDay.
Notably, the SmartRate program is capped at 15 days per year, and in practice PG&E will keep a few in reserve for surprise late season events, but even if there are no Flex Alert days they're still going to be called on electricity-is-expensive-even-if-the-grid-is-stable days.
I bought a moonlander in 2020 after work gave us a work from home credit when we transitioned to remote for Covid. I tried it but couldn’t get into it and it sat collecting dust for years.
In 2024 I dove back into splits with a kinesis freestyle 2. I loved it as it felt more natural as it’s a basic keyboard just split.
After I got used to that I was able to migrate to the moonlander pretty easily. I just had to spend the time to sent it up properly for programming.
Now I own 2, each with the platform addon, which solves many of the issues with tenting as you no longer have to pivot the thumb cluster. It is expensive though.
Both keyboards also have shrimp switches to make typing pretty quiet.
This combined with a ball mouse have solved my RSI that developed a few years ago entirely.
reply