Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

2023-05-09 Thread
I apologize for my previous hasty conclusion. I have conducted further testing on different platforms and would like to share my findings. > FreeBSD Based on my tests, it appears that FreeBSD follows the Itanium C++ ABI specification. The previous test failed because the C++ compiler was not us

Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

2023-05-07 Thread
n, and once we encounter an exception that is not caught, we will fix the code to catch the exception. > doesn't this require us to move our minimum language requirement to > C++-something? No, all code has no dependency on C++. regards, 盏一

Re: Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

2023-05-07 Thread
> It seems extremely specific to one particular C++ implementation To perform a force unwind during longjmp, the _Unwind_ForcedUnwind function is used. This function is defined in the [Itanium C++ ABI Standard](https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#base-throw), which is followe

Proposal for Prototype Implementation to Enhance C/C++ Interoperability in PostgreSQL

2023-05-06 Thread
-6b6034caa00ddf38f641cbd10d5a5d1bb7135f8b23c5a879e9703bd11bd8240f). I would appreciate it if you could review the implementation and provide feedback. Thank you for your time and consideration. Best regards, 盏一 --

Re: use `proc->pgxactoff` as the value of `index` in `ProcArrayRemove()`

2021-06-11 Thread
Ok! Thanks -- --原始邮件-- 发件人:"Andres Freund "

Re: use `proc->pgxactoff` as the value of `index` in `ProcArrayRemove()`

2021-05-06 Thread
> Sounds like a plan! Do you want to write a patch? Add the patch. 0001-use-pgxactoff-as-the-value-of-index-in-ProcArrayRemo.patch Description: Binary data

use `proc->pgxactoff` as the value of `index` in `ProcArrayRemove()`

2021-05-06 Thread
Hi, Since we have introduced `pgxactoff` in [941697c3c1ae5d6ee153065adb96e1e63ee11224](https://github.com/postgres/postgres/commit/941697c3c1ae5d6ee153065adb96e1e63ee11224), and `pgxactoff` is always the index of `proc->pgprocno` in `procArray->pgprocnos`. So it seems that we could directly use

Re:Issue about memory order on ARM

2019-12-01 Thread
Sorry to bother you, now I know that there is no problem here. The model for reading and writing of PGXACT::xid and ShmemVariableCache->latestCompletedXid can be simplified as follows: backend A backend B backend C wlock(XidGenLock);

Issue about memory order on ARM

2019-11-30 Thread
The code in GetSnapshotData() that read the `xid` field of  PGXACT struct has a dependency on code in GetNewTransactionId() that write `MyPgXact->xid`. It means that the store of xid should happen before the load of it. In C11, we can use [Release-Acquire ordering](https://en.cppreference.com/w