frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Bypass PostgreSQL catalog overhead with direct partition hash calculations

https://www.shayon.dev/post/2025/221/bypass-postgresql-catalog-overhead-with-direct-partition-hash-calculations/
24•shayonj•3d ago

Comments

regecks•4h ago
I’d be interested to see a benchmark of actually selecting rows by manually specifying the partition vs not.

This benchmark seems to be pure computation of the hash value, which I don’t think is helpful to test the hypothesis. A lot can happen at actual query time that this benchmark does not account for.

Elucalidavah•4h ago
Tangential: is "without requiring knowledge of data patterns" a frequently useful requirement? I.e. isn't knowledge of data patterns basically required for any performance optimization?
wengo314•4h ago
this looks like maintenance nightmare going forward, but i could be wrong.

If you are stuck on specific pg version for a while, maybe it's worth it.

nopurpose•35m ago
hash won't change on PG version upgrade, because that would cause a massive reshuffling by pg_upgrade: something PG managed to avoid so far.
itsthecourier•3h ago
nice to see ruby getting ahead
ysleepy•3h ago
Without a comparison of letting postgres calculate the partition this is just useless.

And who in their right mind would calculate a hash using a static SQL query that isn't even using the pg catalog hashing routine but a reimplementation.

I'm baffled.

pella•59m ago
Note: PostgreSQL 18 includes many optimisations related to partitions; because of this, the improvement may be smaller. ( https://www.postgresql.org/docs/18/release-18.html )

  -- "Improve the efficiency of planning queries accessing many partitions (Ashutosh Bapat, Yuya Watari, David Rowley)"

  ..."The actual performance increases here are highly dependent on the number
  of partitions and the query being planned.  Performance increases can be
  visible with as few as 8 partitions, but the speedup is marginal for
  such low numbers of partitions.  The speedups become much more visible
  with a few dozen to hundreds of partitions.  With some tested queries
  using 56 partitions, the planner was around 3x faster than before.  For
  use cases with thousands of partitions, these are likely to become
  significantly faster.  Some testing has shown planner speedups of 60x or
  more with 8192 partitions."
  https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d69d45a5a
nopurpose•36m ago
This sounds really interesting. Query planner acquires lightweight lock on every table partition and its indexes. There can be only 16 fast locks, exceed that number and locking becomes significantly more expensive slowing down queries significantly. Workaround I have used so far was to use plan_cache_mode=force_generic which prevents re-planning queries on parameters change.

This approach might be a better option, but sadly app needs to be modified to make use of it.

Monodraw

https://monodraw.helftone.com/
109•mafro•1h ago•42 comments

The Therac-25 Incident

https://thedailywtf.com/articles/the-therac-25-incident
174•lemper•5h ago•97 comments

QEMU 10.1.0

https://wiki.qemu.org/ChangeLog/10.1
52•dmitrijbelikov•59m ago•12 comments

WebLibre: The Privacy-Focused Browser

https://docs.weblibre.eu/
41•mnmalst•3h ago•21 comments

Claude for Chrome

https://www.anthropic.com/news/claude-for-chrome
686•davidbarker•17h ago•367 comments

Ember (YC F24) Is Hiring Full Stack Engineer

https://www.ycombinator.com/companies/ember/jobs/OTB0qby-full-stack-engineering-intern-summer-2026
1•charlene-wang•2m ago

Scientist exposes anti-wind groups as oil-funded. Now they want to silence him

https://electrek.co/2025/08/25/scientist-exposes-anti-wind-groups-as-oil-funded-now-they-want-to-...
331•xbmcuser•5h ago•147 comments

F-35 pilot held 50-minute airborne conference call with engineers before crash

https://www.cnn.com/2025/08/27/us/alaska-f-35-crash-accident-report-hnk-ml
19•Michelangelo11•23m ago•6 comments

Gemini 2.5 Flash Image

https://developers.googleblog.com/en/introducing-gemini-2-5-flash-image/
969•meetpateltech•22h ago•439 comments

Word documents will be saved to the cloud automatically on Windows going forward

https://www.ghacks.net/2025/08/27/your-word-documents-will-be-saved-to-the-cloud-automatically-on...
63•speckx•1h ago•27 comments

Internet Access Providers Aren't Bound by DMCA Unmasking Subpoenas–In Re Cox

https://blog.ericgoldman.org/archives/2025/08/internet-access-providers-arent-bound-by-dmca-unmas...
12•hn_acker•2d ago•1 comments

Dissecting the Apple M1 GPU, the end

https://rosenzweig.io/blog/asahi-gpu-part-n.html
543•alsetmusic•10h ago•113 comments

Show HN: FilterQL – A tiny query language for filtering structured data

https://github.com/adamhl8/filterql
18•genshii•2d ago•5 comments

Light pollution prolongs avian activity

https://gizmodo.com/birds-across-the-world-are-singing-all-day-for-a-disturbing-reason-2000646257
82•gmays•3d ago•16 comments

GNU Artanis – A fast web application framework for Scheme

https://artanis.dev/index.html
229•smartmic•15h ago•51 comments

Rv, a new kind of Ruby management tool

https://andre.arko.net/2025/08/25/rv-a-new-kind-of-ruby-management-tool/
274•steveklabnik•1d ago•102 comments

Chinese astronauts make rocket fuel and oxygen in space

https://www.livescience.com/space/space-exploration/chinese-astronauts-make-rocket-fuel-and-oxyge...
243•Teever•2d ago•106 comments

The man with a Home Computer (1967) [video]

https://www.youtube.com/watch?v=w6Ka42eyudA
51•smarm•6h ago•22 comments

Neuralink 'Participant 1' says his life has changed

https://fortune.com/2025/08/23/neuralink-participant-1-noland-arbaugh-18-months-post-surgery-life...
309•danielmorozoff•3d ago•350 comments

Reverse Engineered Raspberry Pi Compute Module 5

https://github.com/schlae/cm5-reveng
50•_Microft•2d ago•9 comments

One universal antiviral to rule them all?

https://www.cuimc.columbia.edu/news/one-universal-antiviral-rule-them-all
311•breve•21h ago•137 comments

US Intel

https://stratechery.com/2025/u-s-intel/
472•maguay•1d ago•493 comments

Bypass PostgreSQL catalog overhead with direct partition hash calculations

https://www.shayon.dev/post/2025/221/bypass-postgresql-catalog-overhead-with-direct-partition-has...
24•shayonj•3d ago•8 comments

Molluscs of the Multiverse: molluscan diversity in Magic: The Gathering

https://jgeekstudies.org/2025/08/24/molluscs-of-the-multiverse-molluscan-diversity-in-magic-the-g...
10•zdw•2d ago•0 comments

Japan has opened its first osmotic power plant

https://www.theguardian.com/world/2025/aug/25/japan-osmotic-power-plant-fukuoka
268•pseudolus•2d ago•85 comments

SpaCy: Industrial-Strength Natural Language Processing (NLP) in Python

https://github.com/explosion/spaCy
99•marklit•4d ago•36 comments

A teen was suicidal. ChatGPT was the friend he confided in

https://www.nytimes.com/2025/08/26/technology/chatgpt-openai-suicide.html
322•jaredwiener•21h ago•372 comments

iOS 18.6.1 0-click RCE POC

https://github.com/b1n4r1b01/n-days/blob/main/CVE-2025-43300.md
215•akyuu•1d ago•47 comments

The McPhee method for writing deeply reported nonfiction

https://jsomers.net/blog/the-mcphee-method
172•jsomers•1d ago•45 comments

Michigan Supreme Court: Unrestricted phone searches violate Fourth Amendment

https://reclaimthenet.org/michigan-supreme-court-rules-phone-search-warrants-must-be-specific
502•mikece•18h ago•93 comments