fidalgo

fidalgo

High Performance PostgreSQL for Rails: Using Advisory Locks (page 195)

@andatki

In this page, you mention:
The Transaction Pooling Mode for PgBouncer cannot be used with Advisory Locks
Can you expand a title further on this? PgBouncer is like a first resource when people run out of database connections, and now that it supports prepared statements people are much more inclined to continue to use it.
With the increase awareness of advisory locks and things like GoodJob background job processing, are we increasing the risk of problems?

In the table for features for PGBouncer we can find some information: PgBouncer features

Do you think that having a more detailed explanation on the risks and what we should do to ensure to remain compatible (using session pooling, basically)

Even after reading the Choosing A PgBouncer Pooling Mode in page 190 and when using GoodJob, being the transaction mode, the most common, the user can easily fall in the trap of choosing the most common method to later release it’s not supported.

First Post!

andatki

andatki

Author of High Performance PostgreSQL for Rails

Thanks @fidalgo. That’s a good idea to point out that possible surprise. As you noted, we can now use Prepared Statements with PgBouncer in the transaction pooling mode. But other “client features” aren’t supported, also as you noted, leaving only session mode which has less benefits. I agree it would nice to provide some warning and caution about that. I’ll follow up if I can get something included in time. Thank you!

Popular Pragmatic topics Top

jimschubert
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
belgoros
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84: bundle exec sequel...
New
Razor54672
The answer to 3rd Problem of Chapter 5 (Making Choices) of “Practical Programming, Third Edition” seems incorrect in the given answer ke...
New
brianokken
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
New
Mmm
Hi, build fails on: bracket-lib = “~0.8.1” when running on Mac Mini M1 Rust version 1.5.0: Compiling winit v0.22.2 error[E0308]: mi...
New
JohnS
I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps. With: ruby-3.0.0 s...
New
alanq
This isn’t directly about the book contents so maybe not the right forum…but in some of the code apps (e.g. turbo/06) it sends a TURBO_ST...
New
cro
I am working on the “Your Turn” for chapter one and building out the restart button talked about on page 27. It recommends looking into ...
New

Other popular topics Top

malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
New
AstonJ
Thanks to @foxtrottwist’s and @Tomas’s posts in this thread: Poll: Which code editor do you use? I bought Onivim! :nerd_face: https://on...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New

Latest in PragProg

View all threads ❯