---
title: "Comment by Andrew on \"Query Pipelining in node-postgres: 2-3x Throughput With One Line of Code\" | Hashnode"
description: "Promise.allSettled on independent queries looks safe in autocommit once every statement carries its own Sync. Put them inside an explicit BEGIN and the first fa"
url: "https://hashnode.com/posts/query-pipelining-in-node-postgres-2-3x-throughput-with-one-line-of-code/6a84700de4533cf3a0c88966/comment/6a84ed8865b53da44bcd415e"
---

[Discussion](https://hashnode.com/posts/query-pipelining-in-node-postgres-2-3x-throughput-with-one-line-of-code/6a84700de4533cf3a0c88966)

Comment [Query Pipelining in node-postgres: 2-3x Throughput With One Line of Code](https://hashnode.com/posts/query-pipelining-in-node-postgres-2-3x-throughput-with-one-line-of-code/6a84700de4533cf3a0c88966)

[Andrew](https://hashnode.com/@rizzdev)

[Aug 18](https://hashnode.com/posts/query-pipelining-in-node-postgres-2-3x-throughput-with-one-line-of-code/6a84700de4533cf3a0c88966/comment/6a84ed8865b53da44bcd415e)

Promise.allSettled on independent queries looks safe in autocommit once every statement carries its own Sync. Put them inside an explicit BEGIN and the first failed statement aborts the whole transaction, so later pipelined queries still send their own Sync and come back as the current transaction is aborted. Mixed DML settles as partial success at the client while the txn is already dead on that connection. Sequential await still has to own anything you share that BEGIN with, even when the statements never read each other.
