Skip to content

Commit

Permalink
Problem: unclear how ResourceOwner should be managed
Browse files Browse the repository at this point in the history
Solution: provide some reference materials on it
  • Loading branch information
yrashk committed Dec 13, 2022
1 parent b38d9d7 commit df654a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pgx/src/subxact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ use std::ops::Deref;
#[derive(Debug)]
pub struct SubTransaction<Parent: SubTransactionExt, const COMMIT: bool = true> {
memory_context: pg_sys::MemoryContext,
// Resource ownership before the transaction
//
// Based on information from src/backend/utils/resowner/README
// as well as practical use of it in src/pl/plpython/plpy_spi.c
resource_owner: pg_sys::ResourceOwner,
// Should the transaction be released, or was it already committed or rolled back?
//
Expand Down

0 comments on commit df654a1

Please sign in to comment.