Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-08-26 Thread Kevin Grittner
On Thu, Aug 25, 2016 at 4:51 PM, Alvaro Herrera wrote: > Kevin Grittner wrote: >> On Thu, Aug 25, 2016 at 2:56 PM, Alvaro Herrera >> wrote: >> >> > I'm wondering about the TestForOldSnapshot call in scanPendingInsert(). >> > Why do we apply it to the metapage buffer (line 1717 in master)? >> >> I

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-08-25 Thread Alvaro Herrera
Kevin Grittner wrote: > On Thu, Aug 25, 2016 at 2:56 PM, Alvaro Herrera > wrote: > > > I'm wondering about the TestForOldSnapshot call in scanPendingInsert(). > > Why do we apply it to the metapage buffer (line 1717 in master)? > > If there is any chance that GinPageGetMeta(page)->head could hav

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-08-25 Thread Kevin Grittner
On Thu, Aug 25, 2016 at 2:56 PM, Alvaro Herrera wrote: > I'm wondering about the TestForOldSnapshot call in scanPendingInsert(). > Why do we apply it to the metapage buffer (line 1717 in master)? If there is any chance that GinPageGetMeta(page)->head could have changed from a valid block number

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-08-25 Thread Kevin Grittner
On Thu, Aug 25, 2016 at 2:56 PM, Alvaro Herrera wrote: > Kevin Grittner wrote: >> Add the "snapshot too old" feature > >> src/backend/access/gin/ginbtree.c | 9 +- >> src/backend/access/gin/gindatapage.c | 7 +- >> src/backend/access/gin/ginget.c

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-08-25 Thread Alvaro Herrera
Kevin Grittner wrote: > Add the "snapshot too old" feature > src/backend/access/gin/ginbtree.c | 9 +- > src/backend/access/gin/gindatapage.c | 7 +- > src/backend/access/gin/ginget.c| 22 +- > src/backend/access/gin/gininsert.c

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-11 Thread Alexander Korotkov
On Mon, Apr 11, 2016 at 4:27 PM, Alvaro Herrera wrote: > Alexander Korotkov wrote: > > Kevin, > > > > This commit makes me very uneasy. I didn't much care about this patch > > mainly because I didn't imagine its consequences. Now, I see following: > > > > 1) We uglify buffer manager interface a

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-11 Thread Alvaro Herrera
Alexander Korotkov wrote: > Kevin, > > This commit makes me very uneasy. I didn't much care about this patch > mainly because I didn't imagine its consequences. Now, I see following: > > 1) We uglify buffer manager interface a lot. This patch adds 3 more > arguments to BufferGetPage(). It look

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-11 Thread Alexander Korotkov
Kevin, This commit makes me very uneasy. I didn't much care about this patch mainly because I didn't imagine its consequences. Now, I see following: 1) We uglify buffer manager interface a lot. This patch adds 3 more arguments to BufferGetPage(). It looks weird. Should we try to find less inv

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Alvaro Herrera
Kevin Grittner wrote: > Add the "snapshot too old" feature > > This feature is controlled by a new old_snapshot_threshold GUC. A > value of -1 disables the feature, and that is the default. The > value of 0 is just intended for testing. Above that it is the > number of minutes a snapshot can re

Re: [HACKERS] [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Kevin Grittner
On Fri, Apr 8, 2016 at 2:45 PM, Kevin Grittner wrote: > Add the "snapshot too old" feature > src/test/modules/Makefile | 1 + > src/test/modules/snapshot_too_old/Makefile | 47 +++ > .../snapshot_too_old/expected/sto_using_cursor.out | 73 > .../snapshot_too