pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Exclude VACUUMs from RunningXactData
3+ messages / 3 participants
[nested] [flat]

* pgsql: Exclude VACUUMs from RunningXactData
@ 2018-06-07 19:41 Simon Riggs <simon@2ndQuadrant.com>
  2018-06-07 20:24 ` Re: pgsql: Exclude VACUUMs from RunningXactData Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Simon Riggs @ 2018-06-07 19:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Exclude VACUUMs from RunningXactData

GetRunningTransactionData() should ignore VACUUM procs because in some
cases they are assigned xids. This could lead to holding back xmin via
the route of passing the xid to standby and then having that hold back
xmin on master via feedback.

Backpatch to 9.1 needed, but will only do so on supported versions.
Backpatch once proven on the buildfarm.

Reported-by: Greg Stark
Author: Simon Riggs
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CANP8+jJBYt=4PpTfiPb0UrH1_iPhzsxKH5Op_Wec634F0ohnAw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/32ac7a118fc17f5baac1b370f50d759c30bee00a

Modified Files
--------------
src/backend/storage/ipc/procarray.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Exclude VACUUMs from RunningXactData
  2018-06-07 19:41 pgsql: Exclude VACUUMs from RunningXactData Simon Riggs <simon@2ndQuadrant.com>
@ 2018-06-07 20:24 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-06-07 21:22   ` Re: pgsql: Exclude VACUUMs from RunningXactData Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2018-06-07 20:24 UTC (permalink / raw)
  To: Simon Riggs <simon@2ndQuadrant.com>; +Cc: pgsql-committers@lists.postgresql.org

Simon Riggs <simon@2ndQuadrant.com> writes:
> Exclude VACUUMs from RunningXactData
> GetRunningTransactionData() should ignore VACUUM procs because in some
> cases they are assigned xids.

Uh, what?  Lazy vacuum shouldn't acquire an xid.  If it does, that
would suggest it's running code that it's unsafe for
GetRunningTransactionData to ignore.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Exclude VACUUMs from RunningXactData
  2018-06-07 19:41 pgsql: Exclude VACUUMs from RunningXactData Simon Riggs <simon@2ndQuadrant.com>
  2018-06-07 20:24 ` Re: pgsql: Exclude VACUUMs from RunningXactData Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-06-07 21:22   ` Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Andres Freund @ 2018-06-07 21:22 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Simon Riggs <simon@2ndQuadrant.com>; pgsql-committers@lists.postgresql.org

On 2018-06-07 16:24:30 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > Exclude VACUUMs from RunningXactData
> > GetRunningTransactionData() should ignore VACUUM procs because in some
> > cases they are assigned xids.
> 
> Uh, what?  Lazy vacuum shouldn't acquire an xid.  If it does, that
> would suggest it's running code that it's unsafe for
> GetRunningTransactionData to ignore.

Well, we currently do acquire an xid at the end when truncating (see
[1]). But that still doesn't seem to make it the right thing to ignore
these xids.  Let's continue the discussion over there?

Greetings,

Andres Freund

[1] http://archives.postgresql.org/message-id/20180607211918.h2cdja26ypriw2sm%40alap3.anarazel.de




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-06-07 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-07 19:41 pgsql: Exclude VACUUMs from RunningXactData Simon Riggs <simon@2ndQuadrant.com>
2018-06-07 20:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-06-07 21:22   ` Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox