summaryrefslogtreecommitdiff
path: root/src/backend/access/transam/multixact.c
Commit message (Collapse)AuthorAgeFilesLines
* Convert the arithmetic for shared memory size calculation from 'int'Tom Lane2005-08-201-4/+11
| | | | | | | | | | | to 'Size' (that is, size_t), and install overflow detection checks in it. This allows us to remove the former arbitrary restrictions on NBuffers etc. It won't make any difference in a 32-bit machine, but in a 64-bit machine you could theoretically have terabytes of shared buffers. (How efficiently we could manage 'em remains to be seen.) Similarly, num_temp_buffers, work_mem, and maintenance_work_mem can be set above 2Gb on a 64-bit machine. Original patch from Koichi Suzuki, additional work by moi.
* Make GetMultiXactIdMembers() a public function.Tatsuo Ishii2005-08-201-3/+2
|
* Add NOWAIT option to SELECT FOR UPDATE/SHARE.Tom Lane2005-08-011-2/+39
| | | | | Original patch by Hans-Juergen Schoenig, revisions by Karel Zak and Tom Lane.
* Change WAL-logging scheme for multixacts to be more like regularTom Lane2005-06-081-195/+426
| | | | | | transaction IDs, rather than like subtrans; in particular, the information now survives a database restart. Per previous discussion, this is essential for PITR log shipping and for 2PC.
* Split the shared-memory array of PGPROC pointers out of the sinvalTom Lane2005-05-191-4/+4
| | | | | | communication structure, and make it its own module with its own lock. This should reduce contention at least a little, and it definitely makes the code seem cleaner. Per my recent proposal.
* Fix case in which a debug printout would print already-pfreed data.Tom Lane2005-05-071-5/+7
|
* Clean up MultiXactIdExpand's API by separating out the case where weTom Lane2005-05-031-35/+40
| | | | | are creating a new MultiXactId from two regular XIDs. The original coding was unnecessarily complicated and didn't save any code anyway.
* Implement sharable row-level locks, and use them for foreign key referencesTom Lane2005-04-281-0/+1557
to eliminate unnecessary deadlocks. This commit adds SELECT ... FOR SHARE paralleling SELECT ... FOR UPDATE. The implementation uses a new SLRU data structure (managed much like pg_subtrans) to represent multiple- transaction-ID sets. When more than one transaction is holding a shared lock on a particular row, we create a MultiXactId representing that set of transactions and store its ID in the row's XMAX. This scheme allows an effectively unlimited number of row locks, just as we did before, while not costing any extra overhead except when a shared lock actually has to be shared. Still TODO: use the regular lock manager to control the grant order when multiple backends are waiting for a row lock. Alvaro Herrera and Tom Lane.