Re: Pruning never visible changes

2022-09-22 Thread Simon Riggs
On Thu, 22 Sept 2022 at 15:16, Alvaro Herrera wrote: > > On 2022-Sep-22, Simon Riggs wrote: > > > On Mon, 19 Sept 2022 at 00:16, Greg Stark wrote: > > > > VACUUM was willing to remove a committed-dead tuple immediately if it > > > was > > > deleted by the same transaction that inserted i

Re: Pruning never visible changes

2022-09-22 Thread Alvaro Herrera
On 2022-Sep-22, Simon Riggs wrote: > On Mon, 19 Sept 2022 at 00:16, Greg Stark wrote: > > VACUUM was willing to remove a committed-dead tuple immediately if it > > was > > deleted by the same transaction that inserted it. The idea is that > > such a > > tuple could never have been

Re: Pruning never visible changes

2022-09-22 Thread Simon Riggs
On Mon, 19 Sept 2022 at 00:16, Greg Stark wrote: > > On Fri, 16 Sept 2022 at 10:27, Tom Lane wrote: > > > > Simon Riggs writes: > > > A user asked me whether we prune never visible changes, such as > > > BEGIN; > > > INSERT... > > > UPDATE.. (same row) > > > COMMIT; > > > > Didn't we just have t

Re: Pruning never visible changes

2022-09-19 Thread Matthias van de Meent
On Mon, 19 Sept 2022 at 01:16, Greg Stark wrote: > > On Fri, 16 Sept 2022 at 10:27, Tom Lane wrote: > > > > Simon Riggs writes: > > > A user asked me whether we prune never visible changes, such as > > > BEGIN; > > > INSERT... > > > UPDATE.. (same row) > > > COMMIT; > > > > Didn't we just have t

Re: Pruning never visible changes

2022-09-18 Thread Greg Stark
On Fri, 16 Sept 2022 at 10:27, Tom Lane wrote: > > Simon Riggs writes: > > A user asked me whether we prune never visible changes, such as > > BEGIN; > > INSERT... > > UPDATE.. (same row) > > COMMIT; > > Didn't we just have this discussion in another thread? Well. not "just" :) commit 44e4

Re: Pruning never visible changes

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 18:37, Tom Lane wrote: > > Simon Riggs writes: > > On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: > >> You cannot > >> do that, at least not without checking that the originating > >> transaction has no snapshots that could see the older row version. > > > I'm saying this

Re: Pruning never visible changes

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 21:07, Laurenz Albe wrote: > > On Fri, 2022-09-16 at 10:26 -0400, Tom Lane wrote: > > Simon Riggs writes: > > > A user asked me whether we prune never visible changes, such as > > > BEGIN; > > > INSERT... > > > UPDATE.. (same row) > > > COMMIT; > > > > Didn't we just have

Re: Pruning never visible changes

2022-09-16 Thread Laurenz Albe
On Fri, 2022-09-16 at 10:26 -0400, Tom Lane wrote: > Simon Riggs writes: > > A user asked me whether we prune never visible changes, such as > > BEGIN; > > INSERT... > > UPDATE.. (same row) > > COMMIT; > > Didn't we just have this discussion in another thread? For reference: that was https://pos

Re: Pruning never visible changes

2022-09-16 Thread Tom Lane
Simon Riggs writes: > On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: >> You cannot >> do that, at least not without checking that the originating >> transaction has no snapshots that could see the older row version. > I'm saying this is possible only AFTER the end of the originating > xact, so t

Re: Pruning never visible changes

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: > > Simon Riggs writes: > > A user asked me whether we prune never visible changes, such as > > BEGIN; > > INSERT... > > UPDATE.. (same row) > > COMMIT; > > Didn't we just have this discussion in another thread? Not that I was aware of, but it sound

Re: Pruning never visible changes

2022-09-16 Thread Tom Lane
Simon Riggs writes: > A user asked me whether we prune never visible changes, such as > BEGIN; > INSERT... > UPDATE.. (same row) > COMMIT; Didn't we just have this discussion in another thread? You cannot do that, at least not without checking that the originating transaction has no snapshots th