{"id":"f385572b141af73c","repo":"jackc/pgx","slug":"pipeline-closed","errorCode":null,"errorMessage":"pipeline closed","messagePattern":"pipeline closed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgconn/pgconn.go","lineNumber":2568,"sourceCode":"//\n// Note that the request is not itself flushed to the server automatically; use Flush if\n// necessary. This copies the behavior of libpq PQsendPipelineSync.\nfunc (p *Pipeline) SendPipelineSync() {\n\tif p.closed {\n\t\treturn\n\t}\n\n\tp.conn.frontend.SendSync(&pgproto3.Sync{})\n\tp.state.PushBackRequestType(pipelineSyncRequest)\n}\n\n// Flush flushes the queued requests without establishing a synchronization point.\nfunc (p *Pipeline) Flush() error {\n\tif p.closed {\n\t\tif p.err != nil {\n\t\t\treturn p.err\n\t\t}\n\t\treturn errors.New(\"pipeline closed\")\n\t}\n\n\terr := p.conn.flushWithPotentialWriteReadDeadlock()\n\tif err != nil {\n\t\terr = normalizeTimeoutError(p.ctx, err)\n\n\t\tp.conn.asyncClose()\n\n\t\tp.conn.contextWatcher.Unwatch()\n\t\tp.conn.unlock()\n\t\tp.closed = true\n\t\tp.err = err\n\t\treturn err\n\t}\n\n\tp.state.RegisterSendingToServer()\n\treturn nil\n}","sourceCodeStart":2550,"sourceCodeEnd":2586,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgconn/pgconn.go#L2550-L2586","documentation":"Error \"pipeline closed\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgconn/pgconn.go:2568 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}