N
Neon12mo ago
liable-blush

Hello, I don't know which branch to ask

Hello, I don't know which branch to ask this question, so I will ask it here. As I understand it, Neon doesn't work with postgres as 2 different applications, so the question is how do you avoid longjmp from postgres in case of a critical error. Can someone tell us or give a link to this discussion?
4 Replies
adverse-sapphire
adverse-sapphire12mo ago
Hey! Do you mind clarifying what you mean when you say
eon doesn't work with postgres as 2 different applications,
gradual-turquoise
gradual-turquoise12mo ago
As I understand it, Neon exists as a postgreSQL extension (I thought so because I saw the neon.control file), so it is part of the postgreSQL process. But most of Neon is written in RUST, so I assumed that the postgreSQL limitation also applies to this language: If calling backend functions from C++ code, be sure that the C++ call stack contains only plain old data structures (POD). This is necessary because backend errors generate a distant longjmp() that does not properly unroll a C++ call stack with non-POD objects.
inland-turquoise
inland-turquoise12mo ago
no, the neon extension is for communicating with the storage backend. the Rust code in the repo (i.e., pageserver) is not running in neon postgres compute node, but as a separate service.
gradual-turquoise
gradual-turquoise12mo ago
O, thanks

Did you find this page helpful?