Re: [GENERAL] Trying to understand page structures in PG

2016-04-08 Thread Albe Laurenz
Rakesh Kumar wrote: >> Every row has two system columns associated with it: xmin and xmax >> >> xmin is the transaction ID that created the row, while xmax is >> the transaction ID that removed the row. >> >> So when an update takes place, xmax of the original row and xmin >> of the new row are set

Re: [GENERAL] Trying to understand page structures in PG

2016-04-08 Thread Albe Laurenz
Jeff Janes wrote: >> I am curious because of "while xmax is the transaction ID that >> *removed* the row". > > "marked for removal" would be more accurate. If the row were actually > physically removed, it would no longer have a xmax to set. Yes, thanks for the clarification. I was thinking "log

Re: [GENERAL] Trying to understand page structures in PG

2016-04-07 Thread Rakesh Kumar
On Wed, Apr 6, 2016 at 6:33 AM, Albe Laurenz wrote: > Rakesh Kumar wrote: > Every row has two system columns associated with it: xmin and xmax > > xmin is the transaction ID that created the row, while xmax is > the transaction ID that removed the row. > > So when an update takes place, xmax of t

Re: [GENERAL] Trying to understand page structures in PG

2016-04-06 Thread Jeff Janes
On Wed, Apr 6, 2016 at 8:35 AM, rob stone wrote: > On Wed, 2016-04-06 at 10:33 +, Albe Laurenz wrote: > > >> Every row has two system columns associated with it: xmin and xmax >> >> xmin is the transaction ID that created the row, while xmax is >> the transaction ID that removed the row. >> >

Re: [GENERAL] Trying to understand page structures in PG

2016-04-06 Thread rob stone
On Wed, 2016-04-06 at 10:33 +, Albe Laurenz wrote: > Every row has two system columns associated with it: xmin and xmax > > xmin is the transaction ID that created the row, while xmax is > the transaction ID that removed the row. > > So when an update takes place, xmax of the original row a

Re: [GENERAL] Trying to understand page structures in PG

2016-04-06 Thread Joshua D. Drake
On 04/06/2016 02:39 AM, Rakesh Kumar wrote: Hello I understand that when an update of say 100,000 rows are made, PG writes the updated rows as a new row. These new rows are not visible to any sessions except the one creating it. At commit time PG flips something internally to make these rows vis

Re: [GENERAL] Trying to understand page structures in PG

2016-04-06 Thread Albe Laurenz
Rakesh Kumar wrote: > I understand that when an update of say 100,000 rows are made, PG > writes the updated rows as a new row. These new rows are not visible > to any sessions except the one creating it. At commit time PG flips > something internally to make these rows visible to all. > > My Q: w

[GENERAL] Trying to understand page structures in PG

2016-04-06 Thread Rakesh Kumar
Hello I understand that when an update of say 100,000 rows are made, PG writes the updated rows as a new row. These new rows are not visible to any sessions except the one creating it. At commit time PG flips something internally to make these rows visible to all. My Q: what happens to those rows