diff --git a/conn.go b/conn.go
index 2ab009ff..7dee1eec 100644
--- a/conn.go
+++ b/conn.go
@@ -326,6 +326,13 @@ func (c *Conn) Deallocate(ctx context.Context, name string) error {
 	return err
 }
 
+// Deallocate all released prepared statements
+func (c *Conn) DeallocateAll(ctx context.Context, name string) error {
+	c.preparedStatements = map[string]*pgconn.StatementDescription{}
+	_, err := c.pgConn.Exec(ctx, "deallocate all").ReadAll()
+	return err
+}
+
 func (c *Conn) bufferNotifications(_ *pgconn.PgConn, n *pgconn.Notification) {
 	c.notifications = append(c.notifications, n)
 }
diff --git a/conn_test.go b/conn_test.go
index 9cf5fd58..0fafeb18 100644
--- a/conn_test.go
+++ b/conn_test.go
@@ -424,7 +424,7 @@ func TestPrepare(t *testing.T) {
 		t.Errorf("Prepared statement did not return expected value: %v", s)
 	}
 
-	err = conn.Deallocate(context.Background(), "test")
+	err = conn.DeallocateAll(context.Background(), "test")
 	if err != nil {
 		t.Errorf("conn.Deallocate failed: %v", err)
 	}