lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, 22 Jul 2020 at 00:48, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>
> >>>>> "Dibyendu" == Dibyendu Majumdar <mobile@majumdar.org.uk> writes:
>
> Hi, PostgreSQL committer here, please don't try and explain "database
> systems" to me.

I knew that hence I asked the question.

>
>  Dibyendu> Database systems tend to pre-allocate essential memory they
>  Dibyendu> need. As long as the DBMS can rollback to a consistent state
>  Dibyendu> it doesn't really care about failure in a stored proc if that
>  Dibyendu> is what you are referring to.
>
> That is nothing at all what I am referring to. I'm referring to the
> database engine getting a malloc failure at some arbitrary point in the
> backend, which could be at any point during query parsing, planning, or
> execution, and recovering from it with nothing worse than an "out of
> memory" error returned to the client. (In particular, no disconnection
> of clients, no processes exiting, no forced recovery of the db.) The
> only pre-allocation of memory is a small reserve for error handling
> purposes.
>

Okay that is good to know.
What about the buffer pool and the buffers used by the write-ahead
log? Aren't they also pre-allocated?
It has been a long time since I looked at PostgreSQL code.

Regards
Dibyendu