Re: Wrong usage of RelationNeedsWAL

2021-01-28 Thread Kyotaro Horiguchi
At Wed, 27 Jan 2021 23:10:53 -0800, Noah Misch wrote in > On Thu, Jan 28, 2021 at 12:06:27PM +0900, Kyotaro Horiguchi wrote: > > At Wed, 27 Jan 2021 02:48:48 -0800, Noah Misch wrote in > > > On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote: > > > > On Thu, Jan 21, 2021 at 06:02:11PM

Re: Wrong usage of RelationNeedsWAL

2021-01-27 Thread Noah Misch
On Thu, Jan 28, 2021 at 12:06:27PM +0900, Kyotaro Horiguchi wrote: > At Wed, 27 Jan 2021 02:48:48 -0800, Noah Misch wrote in > > On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote: > > > On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > > > > Perhaps I'm missing

Re: Wrong usage of RelationNeedsWAL

2021-01-27 Thread Kyotaro Horiguchi
At Wed, 27 Jan 2021 02:48:48 -0800, Noah Misch wrote in > On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote: > > On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > > > Perhaps I'm missing something, but the patch doesn't pass the v5-0001 > > > test with

Re: Wrong usage of RelationNeedsWAL

2021-01-27 Thread Noah Misch
On Thu, Jan 21, 2021 at 01:23:36AM -0800, Noah Misch wrote: > On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > > At Thu, 21 Jan 2021 00:19:58 -0800, Noah Misch wrote in > > > On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > > > > However, with the previous

Re: Wrong usage of RelationNeedsWAL

2021-01-21 Thread Noah Misch
On Thu, Jan 21, 2021 at 06:02:11PM +0900, Kyotaro Horiguchi wrote: > At Thu, 21 Jan 2021 00:19:58 -0800, Noah Misch wrote in > > On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > > > However, with the previous patch, two existing tests sto_using_cursor > > > and

Re: Wrong usage of RelationNeedsWAL

2021-01-21 Thread Kyotaro Horiguchi
At Thu, 21 Jan 2021 00:19:58 -0800, Noah Misch wrote in > On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > > At Wed, 20 Jan 2021 17:34:44 +0900 (JST), Kyotaro Horiguchi > > wrote in > > > Anyway, it seems actually dangerous that cause pruning on wal-skipped > > > relation.

Re: Wrong usage of RelationNeedsWAL

2021-01-21 Thread Noah Misch
On Thu, Jan 21, 2021 at 12:28:44AM +0900, Kyotaro Horiguchi wrote: > At Wed, 20 Jan 2021 17:34:44 +0900 (JST), Kyotaro Horiguchi > wrote in > > Anyway, it seems actually dangerous that cause pruning on wal-skipped > > relation. > > > > > with your patch versions. Could you try implementing

Re: Wrong usage of RelationNeedsWAL

2021-01-20 Thread Kyotaro Horiguchi
At Wed, 20 Jan 2021 17:34:44 +0900 (JST), Kyotaro Horiguchi wrote in > Anyway, it seems actually dangerous that cause pruning on wal-skipped > relation. > > > with your patch versions. Could you try implementing both test procedures > > in > > src/test/modules/snapshot_too_old? There's no

Re: Wrong usage of RelationNeedsWAL

2021-01-20 Thread Kyotaro Horiguchi
At Tue, 19 Jan 2021 01:31:52 -0800, Noah Misch wrote in > On Tue, Jan 19, 2021 at 01:48:31PM +0900, Kyotaro Horiguchi wrote: > > I understand that you are suggesting that at least > > TransactionIdLimitedForOldSnapshots should follow not only relation > > persistence but RelationNeedsWAL, based

Re: Wrong usage of RelationNeedsWAL

2021-01-19 Thread Noah Misch
On Tue, Jan 19, 2021 at 01:48:31PM +0900, Kyotaro Horiguchi wrote: > At Mon, 18 Jan 2021 17:30:22 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Sun, 17 Jan 2021 23:02:18 -0800, Noah Misch wrote in > > > On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: > > > > I wrote the above

Re: Wrong usage of RelationNeedsWAL

2021-01-18 Thread Kyotaro Horiguchi
At Mon, 18 Jan 2021 17:30:22 +0900 (JST), Kyotaro Horiguchi wrote in > At Sun, 17 Jan 2021 23:02:18 -0800, Noah Misch wrote in > > On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: > > > I wrote the above based on the "PageGetLSN(page) > (snapshot)->lsn" check > > > in > > >

Re: Wrong usage of RelationNeedsWAL

2021-01-18 Thread Kyotaro Horiguchi
At Sun, 17 Jan 2021 23:02:18 -0800, Noah Misch wrote in > On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: > > I wrote the above based on the "PageGetLSN(page) > (snapshot)->lsn" check in > > TestForOldSnapshot(). If the LSN isn't important, what else explains > >

Re: Wrong usage of RelationNeedsWAL

2021-01-17 Thread Noah Misch
On Sun, Jan 17, 2021 at 10:36:31PM -0800, Noah Misch wrote: > On Mon, Jan 18, 2021 at 03:08:38PM +0900, Kyotaro Horiguchi wrote: > > At Fri, 15 Jan 2021 20:38:16 -0800, Noah Misch wrote in > > > On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > > > > ---

Re: Wrong usage of RelationNeedsWAL

2021-01-17 Thread Noah Misch
On Mon, Jan 18, 2021 at 03:08:38PM +0900, Kyotaro Horiguchi wrote: > At Fri, 15 Jan 2021 20:38:16 -0800, Noah Misch wrote in > > On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > > > --- a/src/include/utils/snapmgr.h > > > +++ b/src/include/utils/snapmgr.h > > > @@ -37,7 +37,7

Re: Wrong usage of RelationNeedsWAL

2021-01-17 Thread Kyotaro Horiguchi
Thank you for the comments, Noah and Andres. At Fri, 15 Jan 2021 20:38:16 -0800, Noah Misch wrote in > On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > > The definition of the macro RelationNeedsWAL has been changed by > > c6b92041d3 to include conditions related to the

Re: Wrong usage of RelationNeedsWAL

2021-01-15 Thread Noah Misch
On Wed, Jan 13, 2021 at 04:07:05PM +0900, Kyotaro Horiguchi wrote: > The definition of the macro RelationNeedsWAL has been changed by > c6b92041d3 to include conditions related to the WAL-skip optimization > but some uses of the macro are not relevant to the optimization. That > misuses are

Re: Wrong usage of RelationNeedsWAL

2021-01-15 Thread Andres Freund
Hi, On 2021-01-13 16:07:05 +0900, Kyotaro Horiguchi wrote: > Commit c6b92041d3 changed the definition of RelationNeedsWAL(). > > -#define RelationNeedsWAL(relation) \ > - ((relation)->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT) > +#define RelationNeedsWAL(relation)

Wrong usage of RelationNeedsWAL

2021-01-12 Thread Kyotaro Horiguchi
Hello. Commit c6b92041d3 changed the definition of RelationNeedsWAL(). -#define RelationNeedsWAL(relation) \ - ((relation)->rd_rel->relpersistence == RELPERSISTENCE_PERMANENT) +#define RelationNeedsWAL(relation) \