Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ci/builder/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ pdoc==16.0.0
pg8000==1.31.6
prettytable==3.18.0
psutil==7.2.2
# TODO: Bump psycopg/psycopg-binary to >= 3.3.6 when SQL-840 is fixed
psycopg==3.3.3
psycopg-binary==3.3.3
psycopg==3.3.6
psycopg-binary==3.3.6
pydantic==2.14.1
pyelftools==0.33
pyjwt==2.15.1
Expand Down
4 changes: 3 additions & 1 deletion src/pgwire/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1485,12 +1485,14 @@ where
self.send_parameter_statuses(params).await?;
}
Ok(_) => {}
Err(err) => {
Err(err) if action == EndTransactionAction::Commit => {
self.send(BackendMessage::ErrorResponse(
err.into_response(Severity::Error),
))
.await?;
}
// Only one error can be reported, ignore.
Err(_) => {}
}
Ok(())
}
Expand Down
19 changes: 19 additions & 0 deletions test/cluster/mzcompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -3302,6 +3302,25 @@ def fetch_metrics() -> Metrics:
assert 0 < time < 10, f"got {time}"


def workflow_test_dropped_role_begin(c: Composition) -> None:
c.up("materialized")
c.sql("CREATE ROLE dropped_role")

with c.sql_connection(user="dropped_role") as conn:
conn.autocommit = False
c.sql("DROP ROLE dropped_role")

# Psycopg first sends an implicit BEGIN. Duplicate error responses
# mask the dropped-role error with a client-side InternalError.
try:
conn.execute("SELECT 1")
except psycopg.errors.InsufficientPrivilege as e:
assert "was concurrently dropped" in str(e), str(e)
assert conn.info.transaction_status == psycopg.pq.TransactionStatus.IDLE
else:
raise AssertionError("query succeeded after its role was dropped")


def workflow_test_pgwire_metrics(c: Composition) -> None:
"""Test metrics collected in the Adapter frontend, i.e., `pgwire.rs`"""

Expand Down
Loading