Lessons about PostgreSQL (page 4)
The links, tools and tips our engineers and designers share with each other, one “today I learned” at a time.
- lessons shared
- 83
- people sharing
- 13
- database started in
- 2017








- Link offlineLink offline
Tech Insights· compose.com
Faster Performance with Unlogged Tables in PostgreSQL:
Shared by
The original link on compose.com is no longer available.
Look for it on the Wayback Machine- PostgreSQL
stackoverflow.com
When using psycopg2's ThreadedConnectionPool, an additional sempahore is needed to avoid "connection pool exhausted" errors:
Flávio Juvenal
Tech Insights· stackoverflow.com
When using psycopg2's ThreadedConnectionPool, an additional sempahore is needed to avoid "connection pool exhausted" errors:
Shared by
Read on stackoverflow.com- Concurrency
- DB
- PostgreSQL
- Python
postgresqltutorial.com
PostgreSQL uses the search path to resolve object names. When we refer to a table using just its name, PostgreSQL searches fo...
PostgreSQL uses the search path to resolve object names. When we refer to a table using just its name, PostgreSQL searches for the table by using something called a schema search path, which is a list of schemas to look in. The default is "$user", public:
Rebeca Sarai
Tech Insights· postgresqltutorial.com
PostgreSQL uses the search path to resolve object names. When we refer to a table using just its name, PostgreSQL searches fo...
PostgreSQL uses the search path to resolve object names. When we refer to a table using just its name, PostgreSQL searches for the table by using something called a schema search path, which is a list of schemas to look in. The default is
"$user", public:Shared by
Read on postgresqltutorial.com- PostgreSQL
- Schemas


Tech Insights· medium.com
Lessons learned scaling PostgreSQL database to 1.2bn records/month:
Shared by
Read on medium.com- DB
- Performance
- PostgreSQL
- Scaling

postgresql.org
How to combine multiple indexes:
11.5. Combining Multiple Indexes A single index scan can only use query clauses that use the index's columns with operators of …
Lais Varejão

Tech Insights· postgresql.org
How to combine multiple indexes:
From postgresql.org
11.5. Combining Multiple Indexes A single index scan can only use query clauses that use the index's columns with operators of …
Shared by
Read on postgresql.org- PostgreSQL


Tech Insights· erthalion.info
PostgreSQL at low level: stay curious! >
Shared by
Read on erthalion.info- Database
- PostgreSQL
Today I learned
"DataError: integer out of range" in psycopg may be caused when you have a table with an integer auto-incrementing id and you...
"DataError: integer out of range" in psycopg may be caused when you have a table with an integer auto-incrementing id and you insert more than 2^31-1 records. Note that if you TRUNCATE the table, the id sequence DOES NOT reset. Use ALTER SEQUENCE sequence-name RESTART WITH 1; for that. Find out the sequence name with \d+ table_name.
Flávio Juvenal
Tech Insights
"DataError: integer out of range" in psycopg may be caused when you have a table with an integer auto-incrementing id and you...
"DataError: integer out of range" in psycopg may be caused when you have a table with an integer auto-incrementing id and you insert more than 2^31-1 records. Note that if you TRUNCATE the table, the id sequence DOES NOT reset. Use
ALTER SEQUENCE sequence-name RESTART WITH 1;for that. Find out the sequence name with\d+ table_name.Shared by
- PostgreSQL
- Psycopg
Tech Insights· stackoverflow.com
Best way to select random rows PostgreSQL:
Shared by
Read on stackoverflow.com- Database
- Performance
- PostgreSQL

speakerdeck.com
PostgreSQL Configuration for Humans:
Video: https://www.youtube.com/watch?v=IFIXpm73qtk PostgreSQL is the world’s most advanced open source database. Indeed! With around 270 configuratio…
Flávio Juvenal

Tech Insights· speakerdeck.com
PostgreSQL Configuration for Humans:
From speakerdeck.com
Video: https://www.youtube.com/watch?v=IFIXpm73qtk PostgreSQL is the world’s most advanced open source database. Indeed! With around 270 configuratio…
Shared by
Read on speakerdeck.com- DB
- Performance
- PostgreSQL

depesz.com
Waiting for PostgreSQL 11 – Fast ALTER TABLE ADD COLUMN with a non-NULL default:
Flávio Juvenal

Tech Insights· depesz.com
Waiting for PostgreSQL 11 – Fast ALTER TABLE ADD COLUMN with a non-NULL default:
Shared by
Read on depesz.com- Performance
- PostgreSQL
Today I learned
If you have 4 parallel workers and need to process all rows from a SQL table, probably it's best to split the work with LIMIT...
If you have 4 parallel workers and need to process all rows from a SQL table, probably it's best to split the work with LIMIT/OFFSET into 4 parts and consume them with 4 tasks than to chose some smaller LIMIT/OFFSET and generate more than 4 tasks. OFFSET can get really slow and it doesn't build up speed when you make consecutive ones like OFFSET 1000, OFFSET 1100, OFFSET 1200, etc. In Python: limit = math.ceil(n_rows / n_workers) offsets = range(0, n_rows, limit)
Flávio Juvenal
Tech Insights
If you have 4 parallel workers and need to process all rows from a SQL table, probably it's best to split the work with LIMIT...
If you have 4 parallel workers and need to process all rows from a SQL table, probably it's best to split the work with LIMIT/OFFSET into 4 parts and consume them with 4 tasks than to chose some smaller LIMIT/OFFSET and generate more than 4 tasks. OFFSET can get really slow and it doesn't build up speed when you make consecutive ones like OFFSET 1000, OFFSET 1100, OFFSET 1200, etc. In Python:
limit = math.ceil(n_rows / n_workers) offsets = range(0, n_rows, limit)Shared by
- PostgreSQL
- SQL


Tech Insights· hakibenita.com
Fastest Way to Load Data Into PostgreSQL Using Python
Shared by
Read on hakibenita.com- PostgreSQL
- Python

devcenter.heroku.com
PostgreSQL Concurrency with MVCC:
Understand how Multi Version Concurrency Control is implemented in Postgres and how it affects the design of highly concurrent applications.
Flávio Juvenal

Tech Insights· devcenter.heroku.com
PostgreSQL Concurrency with MVCC:
From devcenter.heroku.com
Understand how Multi Version Concurrency Control is implemented in Postgres and how it affects the design of highly concurrent applications.
Shared by
Read on devcenter.heroku.com- Concurrency
- Mvcc
- PostgreSQL


Tech Insights· pgdash.io
Getting The Most Out Of Your PostgreSQL Indexes:
Shared by
Read on pgdash.io- DB
- Index
- Performance
- PostgreSQL
- SQL

pythonspeed.com
Farewell to fsync(): 10× faster database tests with Docker
Realistic tests require a real database—but that can be difficult and slow. But Docker makes it simple, and some tweaks can make faster.
Gustavo Carvalho

Tech Insights· pythonspeed.com
Farewell to fsync(): 10× faster database tests with Docker
From pythonspeed.com
Realistic tests require a real database—but that can be difficult and slow. But Docker makes it simple, and some tweaks can make faster.
Shared by
Read on pythonspeed.com- Docker
- PostgreSQL
- Python
Book a call
Found it useful?
Let’s put it to work.
Tell us about your product and the problem in front of you. We’ll bring what we’ve learned on real projects.
Tell us about your product, and we’ll bring what we’ve learned.
Still prefer the good old email? Contact us



