sequential-uuids
pg_tle
sequential-uuids | pg_tle | |
---|---|---|
7 | 9 | |
293 | 299 | |
- | 5.0% | |
3.6 | 7.5 | |
7 months ago | 9 days ago | |
C | C | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sequential-uuids
-
Choosing a Postgres Primary Key
Disclaimer: not a dba so my terms might not be appropriate
I’ve seen uuid4 which replaces the first 4 bytes with a timestamp. It was mentioned to me that this strategy allows postgres to write at the end of the index instead of arbitrarily on disk. I also presume it means it has some decent sorting.
[inspiration](https://github.com/tvondra/sequential-uuids/blob/master/sequ...)
-
Install extensions from PGDG repo to YugabyteDB - example with sequential_uuids
yum install -y git git clone https://github.com/tvondra/sequential-uuids.git ysqlsh -h $(hostname) --echo-all --quiet \ --file sequential-uuids/test/sql/uuids.sql | sdiff sequential-uuids/test/expected/uuids.out -
-
Using a custom GUID (not provided by Postgres). What to keep in mind for performance gains
If you want to keep locality when using uuids, use a different generation function such as: https://github.com/tvondra/sequential-uuids
-
Any significant performance disadvantage to using uuid as primary key?
OP, have a pretty large B2B SAAS app with all UUID pkeys, and the largest issues i'd say with UUID compared to bigint are: size, index bloat, WAL bloat, much slower GIST indexes (for exclusion constraints). You can work around some of the issues (WAL bloat, index bloat) by using a better behaved UUID generation function: https://github.com/tvondra/sequential-uuids You can get something similar for your app side of things if you need to generate UUIDs there.
-
Timeflake: 128-bit, roughly-ordered, URL-safe UUIDs
Use this: https://github.com/tvondra/sequential-uuids
If you cannot install extensions, I just wrote a PL/PGSQL implementation for the time-based generator I could share.
-
UUID vs int for primary key - Which is better (with auto increment), especially if you are scared you'll run out of ids?
Just fyi, UUID in Postgres is not 40 text chars, it's 16 bytes binary and has a canonical text representation. Also, you don't need to use UUIDv4, I am quite partial to: https://github.com/tvondra/sequential-uuids
pg_tle
-
Pgcopydb: Copy a Postgres database to a target Postgres server
Have you tried this in databases with [TLE](https://github.com/aws/pg_tle)s?
-
Making PostgreSQL tick: New features in pg_cron
I dunno about other hosted Postgres providers, but not on AWS RDS no, as the Python extension is untrusted. Looks like you can use plv8 via pg_tle (Trusted Language Extensions) [1] though.
[1] https://github.com/aws/pg_tle
-
The Database Package Manager for PostgreSQL Trusted Language Extensions
Partially correct, this doesn't work with RDS as you can't install pgsql-http (a requirement for automatic install). However all the extensions listed are "Trusted Language Extensions for PostgreSQL" which was developed by AWS to enable installing extensions written in "Safe" languages. So I believe the all the extensions listed could bee installed manually.
https://github.com/aws/pg_tle
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Postg...
-
Choosing a Postgres Primary Key
>pg_idkit to their list of supported extensions
For some of these simpler extensions, we're looking at using AWS's TLE (https://github.com/aws/pg_tle), which would allow user-contributed extensions. If we can pull that off, we'll probably look again at the current set of extensions we offer and then see which ones can be ported to a TLE instead
-
postgres extension managers
This is a new thing from AWS: https://github.com/aws/pg_tle. It lets you build extensions that people can use on RDS.
-
SQL Macros in YugabyteDB
I'm taking those functions from the examples in pg_tle, an extension that helps packaging those functions. The functions calculate the Manhattan and Euclidian distance:
- Trusted Language Extensions for PostgreSQL (Pg_tle)
- GitHub - aws/pg_tle: Framework for building trusted language extensions for PostgreSQL
- AWS releases open source Trusted Language Extensions for PostgreSQL
What are some alternatives?
Pomelo.EntityFrameworkCore.MySql - Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector
supavisor - A cloud-native, multi-tenant Postgres connection pooler.