René's URL Explorer Experiment


Title: Feature request: Mergable persistance in Postgres tabular · Issue #237 · tinyplex/tinybase · GitHub

Open Graph Title: Feature request: Mergable persistance in Postgres tabular · Issue #237 · tinyplex/tinybase

X Title: Feature request: Mergable persistance in Postgres tabular · Issue #237 · tinyplex/tinybase

Description: Hi, me again, another issue to track and get feedback on what improvements we're doing to our fork of TinyBase and what we'll raise PR to contribute back. Problem / use-case Is your feature request related to a problem? Please describe. ...

Open Graph Description: Hi, me again, another issue to track and get feedback on what improvements we're doing to our fork of TinyBase and what we'll raise PR to contribute back. Problem / use-case Is your feature request...

X Description: Hi, me again, another issue to track and get feedback on what improvements we're doing to our fork of TinyBase and what we'll raise PR to contribute back. Problem / use-case Is your feature...

Opengraph URL: https://github.com/tinyplex/tinybase/issues/237

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature request: Mergable persistance in Postgres tabular","articleBody":"Hi, me again, another issue to track and get feedback on what improvements we're doing to our fork of TinyBase and what we'll raise PR to contribute back.\n\n## Problem / use-case\n_Is your feature request related to a problem? Please describe._\n\nAs docs mention using mergable data structure with tabular store isn't supported in any SQL backed database\n\u003e The following database-oriented [Persister](https://tinybase.org/api/persisters/interfaces/persister/persister/) types can be used to persist a [MergeableStore](https://tinybase.org/api/mergeable-store/interfaces/mergeable/mergeablestore/), but only in the 'JSON-serialization' mode:\n\u003e - PostgresPersister\n\nOur use-case for having this (related to [#236](https://github.com/tinyplex/tinybase/issues/236)) is that especially during migration towards TinyBase we have an existing application that is writing directly to postgres and we want to sync the changes to a store which is then later synced to DurableObjects and to clients.\n\n\n## Feature Request\n**Describe the solution you'd like**\n\ntl;dr: Allow to use `updated_at` column from the table to create approximate HLC during load from DB. ~~But to be able to do that we'd probably need to change HLC logic.~~\n\nI understand that full support is not possible because it would mean storing HLC and the hash for every cell which in tabular mode isn't really possible/practical. However I believe that we can achieve partial support that would be good in 99% of cases and better than having none.\n\n_disclaimer: following is how I understand how it works. And I'm probably wrong_\n\nIf I understand how HLC generally works it has combination of physical time and logical component. And if we could use `updated_at` timestamp from the database as source of physical time we could create an approximate HLC which could be used for merging data together. If we fix the logical counter for approx HLC to 0 we would have a predictable behaviour that in case of 2 writes within same millisecond TinyBase wins. That would work great for us.\n\n~~However, looking through Tinybase [hlc implementation](https://github.com/tinyplex/tinybase/blob/main/src/common/hlc.ts) it seems that it's not using physical time at all. I'm assuming that it's because we can't trust browsers to have correct time set and wrong time could cause completely wrong resolutions. But often HLC implementations have built in protection by checking for back-in-time jumps and adjusting physical time (from wall clock time) to handle that gracefully.~~ _As guessed at in the original write down, I was wrong. The Tinybase HLC implementation uses timestamp_\n\n## Alternatives\n**Describe alternatives you've considered**\nunfortunately we don't see an alternative that would work for us within current TinyBase capabilities. Our main alternative is to completely fork the persister and implement this.\n\n**Additional context**\nThis partially relates to my existing [PR for whereCondition](https://github.com/tinyplex/tinybase/pull/234) and [Feature Request #236](https://github.com/tinyplex/tinybase/issues/236) for partial load of postgres changes but it's not coupled with either of them.\n","author":{"url":"https://github.com/jakubriedl","@type":"Person","name":"jakubriedl"},"datePublished":"2025-04-29T14:55:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/237/tinybase/issues/237"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:868342f1-e3f0-7add-8918-5f19f6e1578f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA26A:2CF315:A0163B:E4A8D0:6A4E43DF
html-safe-noncec22454737d90d4eacb68764d87b55668b09582f09efc1ed5c347e87f85b835c3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjZBOjJDRjMxNTpBMDE2M0I6RTRBOEQwOjZBNEU0M0RGIiwidmlzaXRvcl9pZCI6IjE3OTg4OTM0ODY4ODA5OTgzNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6ba6d2bfacda9bfa9f706506cf1a14772ce1239215ad9103146d8eda96003ebe
hovercard-subject-tagissue:3028658813
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/tinyplex/tinybase/237/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dc968bde7016cc50fae554103c3e07109b9396d5f84d72ab0e67d1d1be392fac/tinyplex/tinybase/issues/237
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dc968bde7016cc50fae554103c3e07109b9396d5f84d72ab0e67d1d1be392fac/tinyplex/tinybase/issues/237
og:image:altHi, me again, another issue to track and get feedback on what improvements we're doing to our fork of TinyBase and what we'll raise PR to contribute back. Problem / use-case Is your feature request...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejakubriedl
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
go-importgithub.com/tinyplex/tinybase git https://github.com/tinyplex/tinybase.git
octolytics-dimension-user_id96894742
octolytics-dimension-user_logintinyplex
octolytics-dimension-repository_id443220240
octolytics-dimension-repository_nwotinyplex/tinybase
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id443220240
octolytics-dimension-repository_network_root_nwotinyplex/tinybase
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9fabff9b8b127e686a3ec86f91422e818056ca2c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/tinyplex/tinybase/issues/237#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftinyplex%2Ftinybase%2Fissues%2F237
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftinyplex%2Ftinybase%2Fissues%2F237
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=tinyplex%2Ftinybase
Reloadhttps://github.com/tinyplex/tinybase/issues/237
Reloadhttps://github.com/tinyplex/tinybase/issues/237
Reloadhttps://github.com/tinyplex/tinybase/issues/237
Please reload this pagehttps://github.com/tinyplex/tinybase/issues/237
tinyplex https://github.com/tinyplex
tinybasehttps://github.com/tinyplex/tinybase
Please reload this pagehttps://github.com/tinyplex/tinybase/issues/237
Notifications https://github.com/login?return_to=%2Ftinyplex%2Ftinybase
Fork 130 https://github.com/login?return_to=%2Ftinyplex%2Ftinybase
Star 5.1k https://github.com/login?return_to=%2Ftinyplex%2Ftinybase
Code https://github.com/tinyplex/tinybase
Issues 26 https://github.com/tinyplex/tinybase/issues
Pull requests 0 https://github.com/tinyplex/tinybase/pulls
Discussions https://github.com/tinyplex/tinybase/discussions
Actions https://github.com/tinyplex/tinybase/actions
Projects https://github.com/tinyplex/tinybase/projects
Security and quality 0 https://github.com/tinyplex/tinybase/security
Insights https://github.com/tinyplex/tinybase/pulse
Code https://github.com/tinyplex/tinybase
Issues https://github.com/tinyplex/tinybase/issues
Pull requests https://github.com/tinyplex/tinybase/pulls
Discussions https://github.com/tinyplex/tinybase/discussions
Actions https://github.com/tinyplex/tinybase/actions
Projects https://github.com/tinyplex/tinybase/projects
Security and quality https://github.com/tinyplex/tinybase/security
Insights https://github.com/tinyplex/tinybase/pulse
Feature request: Mergable persistance in Postgres tabularhttps://github.com/tinyplex/tinybase/issues/237#top
https://github.com/jakubriedl
enhancementNew feature or requesthttps://github.com/tinyplex/tinybase/issues?q=state%3Aopen%20label%3A%22enhancement%22
working on itPlease be patient!https://github.com/tinyplex/tinybase/issues?q=state%3Aopen%20label%3A%22working%20on%20it%22
https://github.com/jakubriedl
jakubriedlhttps://github.com/jakubriedl
on Apr 29, 2025https://github.com/tinyplex/tinybase/issues/237#issue-3028658813
Persisterhttps://tinybase.org/api/persisters/interfaces/persister/persister/
MergeableStorehttps://tinybase.org/api/mergeable-store/interfaces/mergeable/mergeablestore/
#236https://github.com/tinyplex/tinybase/issues/236
hlc implementationhttps://github.com/tinyplex/tinybase/blob/main/src/common/hlc.ts
PR for whereConditionhttps://github.com/tinyplex/tinybase/pull/234
Feature Request #236https://github.com/tinyplex/tinybase/issues/236
jakubriedlhttps://github.com/jakubriedl
enhancementNew feature or requesthttps://github.com/tinyplex/tinybase/issues?q=state%3Aopen%20label%3A%22enhancement%22
working on itPlease be patient!https://github.com/tinyplex/tinybase/issues?q=state%3Aopen%20label%3A%22working%20on%20it%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.