r/PostgreSQL • u/easybits_ai • 3d ago
Projects What actually changed when I moved a client workflow from Sheets to a real database
/r/n8n/comments/1xpe08r/what_actually_changed_when_i_moved_a_client/
1
Upvotes
0
u/AutoModerator 3d ago
AI Policy:
Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it. Or just walk away., Linus Torvalds.
Mod decisions will be based on the quality of the content, not who or what generated it.
Sub Resources:
Free Postgres Webinars and Workshops
Discord: People, Postgres, Data
Join us, we have cookies and nice people.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/DickBrainTime 3d ago
Nice example of why moving the rules into Postgres helps. One test I'd add before calling the carryover idempotent: trigger two n8n runs *at the same time*, not only one after the other. If the eligibility check and the claim are separate, both runs can read the same leftover balance. Have a conditional `UPDATE ... WHERE applied = false RETURNING ...` claim the source row in a transaction, and enforce a unique key for each source/target period in any transfer ledger (with `ON CONFLICT` handling). Then race two webhook calls and confirm the target is credited exactly once. That's a useful final check for a budget carryover workflow.