Re: [HACKERS] Fix obsolete comment in GetSnapshotData

2017-04-03 Thread Robert Haas
On Sun, Apr 2, 2017 at 9:29 PM, Craig Ringer  wrote:
> You're right, I muddled it with PROCARRAY_VACUUM_FLAG.
>
> PROCARRAY_FLAGS_VACUUM is sufficient.

Committed that way.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Fix obsolete comment in GetSnapshotData

2017-04-02 Thread Craig Ringer
On 31 March 2017 at 21:59, Robert Haas  wrote:
> On Wed, Mar 29, 2017 at 12:00 AM, Craig Ringer  wrote:
>> There's an outdated reference to GetOldestXmin(true, true) in
>> GetSnapshotData. It hasn't had that call signature for a long while
>> now. Update the comment to reflect the current signature.
>>
>> diff --git a/src/backend/storage/ipc/procarray.c
>> b/src/backend/storage/ipc/procarray.c
>> index f32881b..4bf0243 100644
>> --- a/src/backend/storage/ipc/procarray.c
>> +++ b/src/backend/storage/ipc/procarray.c
>> @@ -1556,7 +1556,8 @@ GetMaxSnapshotSubxidCount(void)
>>   *  older than this are known not running any more.
>>   *  RecentGlobalXmin: the global xmin (oldest TransactionXmin across all
>>   *  running transactions, except those running LAZY VACUUM).  This 
>> is
>> - *  the same computation done by GetOldestXmin(true, true).
>> + *  the same computation done by
>> + *  GetOldestXmin(NULL, 
>> PROCARRAY_FLAGS_DEFAULT|PROCARRAY_FLAGS_VACUUM)
>>   *  RecentGlobalDataXmin: the global xmin for non-catalog tables
>>   *  >= RecentGlobalXmin
>>   *
>
> PROCARRAY_FLAGS_VACUUM is defined as a bitwise or with
> PROCARRAY_FLAGS_DEFAULT.  So or-ing it back with that same value does
> not seem quite right.

You're right, I muddled it with PROCARRAY_VACUUM_FLAG.

PROCARRAY_FLAGS_VACUUM is sufficient.



diff --git a/src/backend/storage/ipc/procarray.c
b/src/backend/storage/ipc/procarray.c
index f32881b..4bf0243 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1556,7 +1556,8 @@ GetMaxSnapshotSubxidCount(void)
  *  older than this are known not running any more.
  *  RecentGlobalXmin: the global xmin (oldest TransactionXmin across all
  *  running transactions, except those running LAZY VACUUM).  This is
- *  the same computation done by GetOldestXmin(true, true).
+ *  the same computation done by
+ *  GetOldestXmin(NULL, PROCARRAY_FLAGS_VACUUM)
  *  RecentGlobalDataXmin: the global xmin for non-catalog tables
  *  >= RecentGlobalXmin
  *


-- 
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Fix obsolete comment in GetSnapshotData

2017-03-31 Thread Robert Haas
On Wed, Mar 29, 2017 at 12:00 AM, Craig Ringer  wrote:
> There's an outdated reference to GetOldestXmin(true, true) in
> GetSnapshotData. It hasn't had that call signature for a long while
> now. Update the comment to reflect the current signature.
>
> diff --git a/src/backend/storage/ipc/procarray.c
> b/src/backend/storage/ipc/procarray.c
> index f32881b..4bf0243 100644
> --- a/src/backend/storage/ipc/procarray.c
> +++ b/src/backend/storage/ipc/procarray.c
> @@ -1556,7 +1556,8 @@ GetMaxSnapshotSubxidCount(void)
>   *  older than this are known not running any more.
>   *  RecentGlobalXmin: the global xmin (oldest TransactionXmin across all
>   *  running transactions, except those running LAZY VACUUM).  This is
> - *  the same computation done by GetOldestXmin(true, true).
> + *  the same computation done by
> + *  GetOldestXmin(NULL, 
> PROCARRAY_FLAGS_DEFAULT|PROCARRAY_FLAGS_VACUUM)
>   *  RecentGlobalDataXmin: the global xmin for non-catalog tables
>   *  >= RecentGlobalXmin
>   *

PROCARRAY_FLAGS_VACUUM is defined as a bitwise or with
PROCARRAY_FLAGS_DEFAULT.  So or-ing it back with that same value does
not seem quite right.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


[HACKERS] Fix obsolete comment in GetSnapshotData

2017-03-28 Thread Craig Ringer
Hi all

There's an outdated reference to GetOldestXmin(true, true) in
GetSnapshotData. It hasn't had that call signature for a long while
now. Update the comment to reflect the current signature.

diff --git a/src/backend/storage/ipc/procarray.c
b/src/backend/storage/ipc/procarray.c
index f32881b..4bf0243 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1556,7 +1556,8 @@ GetMaxSnapshotSubxidCount(void)
  *  older than this are known not running any more.
  *  RecentGlobalXmin: the global xmin (oldest TransactionXmin across all
  *  running transactions, except those running LAZY VACUUM).  This is
- *  the same computation done by GetOldestXmin(true, true).
+ *  the same computation done by
+ *  GetOldestXmin(NULL, PROCARRAY_FLAGS_DEFAULT|PROCARRAY_FLAGS_VACUUM)
  *  RecentGlobalDataXmin: the global xmin for non-catalog tables
  *  >= RecentGlobalXmin
  *


-- 
 Craig Ringer   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers