From: Bruce Momjian Date: Fri, 2 Sep 2005 15:22:44 +0000 (+0000) Subject: Add text: X-Git-Tag: REL9_0_0~9332 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fad7e8edac3348ea14aca379e7b3b2d713746cd3;p=pg-rex%2Fsyncrep.git Add text: * Merge xmin/xmax/cmin/cmax back into three header fields Before subtransactions, there used to be only three fields needed to store these four values. This was possible because only the current transaction looks at the cmin/cmax values. If the current transaction created and expired the row the fields stored where xmin (same as xmax), cmin, cmax, and if the transaction was expiring a row from a another transaction, the fields stored were xmin (cmin was not needed), xmax, and cmax. Such a system worked because a transaction could only see committed rows from another transaction. However, subtransactions can see rows from outer transactions, and once the subtransaction completes, the outer transaction continues, requiring the storage of all four fields. With subtransactions, an outer transaction can create a row, a subtransaction expire it, and when the subtransaction completes, the outer transaction still has to have proper visibility of the row, for example, for cursors. One possible solution is to create a phantom cid which represents a cmin/cmax pair and is stored in local memory. --- diff --git a/doc/TODO b/doc/TODO index 7c88a4afe3..29477a21a7 100644 --- a/doc/TODO +++ b/doc/TODO @@ -2,7 +2,7 @@ PostgreSQL TODO List ==================== Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us) -Last updated: Thu Sep 1 20:49:44 EDT 2005 +Last updated: Fri Sep 2 11:22:36 EDT 2005 The most recent version of this document can be viewed at http://www.postgresql.org/docs/faqs.TODO.html. @@ -962,6 +962,26 @@ Miscellaneous Performance could hit disk before WAL is written. * Add a script to ask system configuration questions and tune postgresql.conf +* Merge xmin/xmax/cmin/cmax back into three header fields + + Before subtransactions, there used to be only three fields needed to + store these four values. This was possible because only the current + transaction looks at the cmin/cmax values. If the current transaction + created and expired the row the fields stored where xmin (same as + xmax), cmin, cmax, and if the transaction was expiring a row from a + another transaction, the fields stored were xmin (cmin was not + needed), xmax, and cmax. Such a system worked because a transaction + could only see committed rows from another transaction. However, + subtransactions can see rows from outer transactions, and once the + subtransaction completes, the outer transaction continues, requiring + the storage of all four fields. With subtransactions, an outer + transaction can create a row, a subtransaction expire it, and when the + subtransaction completes, the outer transaction still has to have + proper visibility of the row, for example, for cursors. + + One possible solution is to create a phantom cid which represents a + cmin/cmax pair and is stored in local memory. + * Use a phantom command counter for nested subtransactions to reduce per-tuple overhead * Research storing disk pages with no alignment/padding diff --git a/doc/src/FAQ/TODO.html b/doc/src/FAQ/TODO.html index f24c9a5605..d3cb006089 100644 --- a/doc/src/FAQ/TODO.html +++ b/doc/src/FAQ/TODO.html @@ -8,7 +8,7 @@

PostgreSQL TODO List

Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
-Last updated: Thu Sep 1 20:49:44 EDT 2005 +Last updated: Fri Sep 2 11:22:36 EDT 2005

The most recent version of this document can be viewed at
http://www.postgresql.org/docs/faqs.TODO.html. @@ -867,6 +867,25 @@ first. could hit disk before WAL is written.

  • Add a script to ask system configuration questions and tune postgresql.conf +
  • Merge xmin/xmax/cmin/cmax back into three header fields +

    Before subtransactions, there used to be only three fields needed to + store these four values. This was possible because only the current + transaction looks at the cmin/cmax values. If the current transaction + created and expired the row the fields stored where xmin (same as + xmax), cmin, cmax, and if the transaction was expiring a row from a + another transaction, the fields stored were xmin (cmin was not + needed), xmax, and cmax. Such a system worked because a transaction + could only see committed rows from another transaction. However, + subtransactions can see rows from outer transactions, and once the + subtransaction completes, the outer transaction continues, requiring + the storage of all four fields. With subtransactions, an outer + transaction can create a row, a subtransaction expire it, and when the + subtransaction completes, the outer transaction still has to have + proper visibility of the row, for example, for cursors. +

    +

    One possible solution is to create a phantom cid which represents a + cmin/cmax pair and is stored in local memory. +

  • Use a phantom command counter for nested subtransactions to reduce per-tuple overhead
  • Research storing disk pages with no alignment/padding