Re: trivial fix in fd.c - Mailing list pgsql-patches

From Tom Lane
Subject Re: trivial fix in fd.c
Date
Msg-id 16274.1148309524@sss.pgh.pa.us
Whole thread Raw
In response to trivial fix in fd.c  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-patches
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> What's the rationale of designing resowner
> APIs like this:

>     ResourceOwnerEnlargeABC();
>     ResourceOwnerRememberABC();

> Is that because sometimes we don't allow any elog in
> ResourceOwnerRememberABC()?

Yeah.  In a number of cases, ResourceOwnerRememberABC is done after
inserting the resource into some data structure, and an elog there
would leave the data structure in an inconsistent state.  Conversely,
we might fail to insert the resource into the other data structure,
so just inserting it into the resowner first isn't better.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: trivial fix in fd.c
Next
From: Simon Riggs
Date:
Subject: archiver.pid