<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p" -->

---
title: PostgreSQL adapter for Python | daily.dev
description: Psycopg 2.6.2 is out as an interim maintenance release bundling a year of bug fixes ahead of the more feature-rich 2.7. Fixes include handling of externally...
canonical: https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PostgreSQL adapter for Python | daily.dev
og:description: Psycopg 2.6.2 is out as an interim maintenance release bundling a year of bug fixes ahead of the more feature-rich 2.7. Fixes include handling of externally...
og:url: https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p
og:image: https://api.daily.dev/og/posts/UFsGl7S9p.png
og:image:alt: PostgreSQL adapter for Python
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL adapter for Python

**[Psycopg](https://daily.dev/sources/psycopg)** · 2 min read · 0 upvotes · 0 comments

## Summary

Psycopg 2.6.2 is out as an interim maintenance release bundling a year of bug fixes ahead of the more feature-rich 2.7. Fixes include handling of externally closed connections, better error reporting with server response status, a NotSupportedError for unhandled server responses, Ctrl-C interruption of long-running queries via the wait_select callback, PersistentConnectionPool fixes for Python 3, a segfault fix on repr() of uninitialized connections, setuptools/wheel support, a Windows Python 3.5/VS2015 build fix, thread-safety fixes, and an updated errorcodes map matching PostgreSQL 9.5.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.psycopg.org/articles/2016/07/07/psycopg-262-released>

## Questions this post answers

### What bugs were fixed in psycopg2 2.6.2?

Psycopg 2.6.2 fixes inconsistent state in externally closed connections, adds server response status reporting on errors, raises NotSupportedError on unhandled server responses, allows overriding string adapter encoding with no connection, fixes PersistentConnectionPool on Python 3, fixes a segfault on repr() of an uninitialized connection, and adds setuptools/wheel support.

_Track dependency changelogs like this one on daily.dev before upgrading a database adapter in production._

### Does psycopg2 2.6.2 let me interrupt a long-running PostgreSQL query with Ctrl-C?

Yes, psycopg2 2.6.2 introduces a wait_select callback that allows interrupting a long-running query in an interactive shell using Ctrl-C, addressing a longstanding usability gap when running queries from a Python REPL.

_daily.dev helps developers keep up with adapter-level fixes that change everyday database workflows._

### Is psycopg2 2.6.2 a major feature release or a maintenance release?

Psycopg 2.6.2 is an interim maintenance release packing together a year of bug fixes, released ahead of version 2.7 which is intended to deliver several new features. It updates the errorcodes map to match PostgreSQL 9.5 and fixes numerous stability and build issues rather than adding new functionality.

_Developers planning a database library upgrade path can follow release notes like this via daily.dev._

---

Tags: [#python](https://daily.dev/tags/python), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"PostgreSQL adapter for Python","url":"https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p"},"datePublished":"2026-08-23T12:22:15.803Z","dateModified":"2026-08-23T12:48:28.097Z","description":"Psycopg 2.6.2 is out as an interim maintenance release bundling a year of bug fixes ahead of the more feature-rich 2.7. Fixes include handling of externally...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b0cbd2ac8948f96ab39fa6a90db7464f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b0cbd2ac8948f96ab39fa6a90db7464f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Psycopg","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Psycopg","logo":"https://media.daily.dev/image/upload/s--5N-KNNWk--/f_auto,q_auto/v1787487485/logos/psycopg?_a=BAMAMicg0","url":"https://daily.dev/sources/psycopg"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,postgresql","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Psycopg","item":"https://daily.dev/sources/psycopg"},{"@type":"ListItem","position":3,"name":"PostgreSQL adapter for Python"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/postgresql-adapter-for-python-ufsgl7s9p#faq","mainEntity":[{"@type":"Question","name":"What bugs were fixed in psycopg2 2.6.2?","acceptedAnswer":{"@type":"Answer","text":"Psycopg 2.6.2 fixes inconsistent state in externally closed connections, adds server response status reporting on errors, raises NotSupportedError on unhandled server responses, allows overriding string adapter encoding with no connection, fixes PersistentConnectionPool on Python 3, fixes a segfault on repr() of an uninitialized connection, and adds setuptools/wheel support. Track dependency changelogs like this one on daily.dev before upgrading a database adapter in production."}},{"@type":"Question","name":"Does psycopg2 2.6.2 let me interrupt a long-running PostgreSQL query with Ctrl-C?","acceptedAnswer":{"@type":"Answer","text":"Yes, psycopg2 2.6.2 introduces a wait_select callback that allows interrupting a long-running query in an interactive shell using Ctrl-C, addressing a longstanding usability gap when running queries from a Python REPL. daily.dev helps developers keep up with adapter-level fixes that change everyday database workflows."}},{"@type":"Question","name":"Is psycopg2 2.6.2 a major feature release or a maintenance release?","acceptedAnswer":{"@type":"Answer","text":"Psycopg 2.6.2 is an interim maintenance release packing together a year of bug fixes, released ahead of version 2.7 which is intended to deliver several new features. It updates the errorcodes map to match PostgreSQL 9.5 and fixes numerous stability and build issues rather than adding new functionality. Developers planning a database library upgrade path can follow release notes like this via daily.dev."}}]}
```

