Re: Mark btree_gist functions as PARALLEL SAFE

2020-07-20 Thread Alexander Korotkov
On Mon, Jul 20, 2020 at 3:18 PM Justin Pryzby  wrote:

> On Wed, Jul 15, 2020 at 03:26:24PM +0300, Alexander Korotkov wrote:
> > On Thu, Jun 18, 2020 at 7:48 PM Winfield, Steven
> >  wrote:
> > > Done - thanks again.
> >
> > This patch looks good to me.
> >
> > I'm going to push this if no objections.
>
> I marked as committed to make patch checker look healthier.
>

Thank you!

--
Regards,
Alexander Korotkov


Re: Mark btree_gist functions as PARALLEL SAFE

2020-07-20 Thread Justin Pryzby
On Wed, Jul 15, 2020 at 03:26:24PM +0300, Alexander Korotkov wrote:
> On Thu, Jun 18, 2020 at 7:48 PM Winfield, Steven
>  wrote:
> > Done - thanks again.
> 
> This patch looks good to me.
> 
> I'm going to push this if no objections.

I marked as committed to make patch checker look healthier.

Thanks,
-- 
Justin




Re: Mark btree_gist functions as PARALLEL SAFE

2020-07-15 Thread Alexander Korotkov
On Thu, Jun 18, 2020 at 7:48 PM Winfield, Steven
 wrote:
> Done - thanks again.

This patch looks good to me.

I've rechecked it marks all the functions as parallel safe by
installing an extension and querying the catalog.  I've also rechecked
that there is nothing suspicious in these functions in terms of
parallel safety.  I did just minor adjustments in migration script
comments.

I'm going to push this if no objections.

--
Regards,
Alexander Korotkov


0001-Update-btree_gist-extension-for-parallel-query.patch
Description: Binary data


Re: Mark btree_gist functions as PARALLEL SAFE

2020-06-18 Thread Winfield, Steven
Done - thanks again.

Steven.

From: Tom Lane 
Sent: 18 June 2020 16:28
To: Winfield, Steven 
Cc: pgsql-hackers@lists.postgresql.org 
Subject: Re: Mark btree_gist functions as PARALLEL SAFE

"Winfield, Steven"  writes:
> On the back of this thread[1] over at pgsql-general, I've attached a patch 
> that marks the functions in btree_gist as PARALLEL SAFE.

Cool, please add this patch to the commitfest queue to make sure we
don't lose track of it:

https://urldefense.proofpoint.com/v2/url?u=https-3A__commitfest.postgresql.org_28_=DwIFAg=55O-mPK0zNHOMgGDdj4__Q=JVb896wEUUvWD7VB-jCoEHWXWQRzU6xqZ3aOcIepVzQ=oE70Ndze7YukhfkcIi70pjHsKB2zAgJuNkcyEXLkSso=G4QLL-xXQrC_txQXOnZGH8bD5kq6sOPh5BY-DyWA9fw=

(You'll need to have a community-website login if you don't already)

regards, tom lane

** Cantab Capital Partners LLP is now named GAM Systematic LLP. Please note 
that our email addresses have changed from @cantabcapital.com to @gam.com.**

This email was sent by and on behalf of GAM Investments. GAM Investments is the 
corporate brand for GAM Holding AG and its direct and indirect subsidiaries. 
These companies may be referred to as 'GAM' or 'GAM Investments'. In the United 
Kingdom, the business of GAM Investments is conducted by GAM (U.K.) Limited 
(No. 01664573) or one or more entities under the control of GAM (U.K.) Limited, 
including the following entities authorised and regulated by the Financial 
Conduct Authority: GAM International Management Limited (No. 01802911), GAM 
London Limited (No. 00874802), GAM Sterling Management Limited (No. 01750352), 
GAM Unit Trust Management Company Limited (No. 2873560) and GAM Systematic LLP 
(No. OC317557). GAM (U.K.) Limited and its regulated entities are registered in 
England and Wales. The registered office and principal place of business of GAM 
(U.K.) Limited and its regulated entities is at 8 Finsbury Circus, London, 
England, EC2M 7GB. The registered office of GAM Systematic LLP is at City 
House, Hills Road, Cambridge, CB2 1RE. This email, and any attachments, is 
confidential and may be privileged or otherwise protected from disclosure. It 
is intended solely for the stated addressee(s) and access to it by any other 
person is unauthorised. If you are not the intended recipient, you must not 
disclose, copy, circulate or in any other way use or rely on the information 
contained herein. If you have received this email in error, please inform us 
immediately and delete all copies of it. See - 
https://www.gam.com/en/legal/email-disclosures-eu/ for further information on 
confidentiality, the risks of non-secure electronic communication, and certain 
disclosures which we are required to make in accordance with applicable 
legislation and regulations. If you cannot access this link, please notify us 
by reply message and we will send the contents to you. GAM Investments will 
collect and use information about you in the course of your interactions with 
us. Full details about the data types we collect and what we use this for and 
your related rights is set out in our online privacy policy at 
https://www.gam.com/en/legal/privacy-policy. Please familiarise yourself with 
this policy and check it from time to time for updates as it supplements this 
notice.


Re: Mark btree_gist functions as PARALLEL SAFE

2020-06-18 Thread Tom Lane
"Winfield, Steven"  writes:
> On the back of this thread[1] over at pgsql-general, I've attached a patch 
> that marks the functions in btree_gist as PARALLEL SAFE.

Cool, please add this patch to the commitfest queue to make sure we
don't lose track of it:

https://commitfest.postgresql.org/28/

(You'll need to have a community-website login if you don't already)

regards, tom lane




Mark btree_gist functions as PARALLEL SAFE

2020-06-18 Thread Winfield, Steven
Hi,

On the back of this thread[1] over at pgsql-general, I've attached a patch that 
marks the functions in btree_gist as PARALLEL SAFE.
This is primarily to allow parallel plans to be considered when btree_gist's 
<-> operator is used in any context; for example in an expression
that will be evaluated at execution time, or in a functional column in btree or 
gist indexes.

In the latter example, despite the functions already being marked IMMUTABLE, 
attempts to retrieve precomputed values from a functional index during an index 
scan or index-only scan still require the function to be marked PARALLEL SAFE 
to prevent dropping down to a serial plan.

It requires btree_gist's version to be bumped to 1.6.

In line with this commit[2], and for the same reasons, all functions defined by 
btree_gist are being marked as safe:

---

"... Note that some of the markings added by this commit don't have any
effect; for example, gseg_picksplit() isn't likely to be mentioned
explicitly in a query and therefore it's parallel-safety marking will
never be consulted.  But this commit just marks everything for
consistency: if it were somehow used in a query, that would be fine as
far as parallel query is concerned, since it does not consult any
backend-private state, attempt to write data, etc."

---

I haven't added any more tests, but neither did I find any added with the above 
commit.

"CREATE EXTENSION btree_gist" runs successfully, as does "make check-world".

This is the first patch I've submitted, so if I've omitted something then 
please let me know.
Thanks for your time,
Steven.


[1] 
https://www.postgresql.org/message-id/DB7PR09MB2537E18FF90C1C1BBF49D628FD830%40DB7PR09MB2537.eurprd09.prod.outlook.com
[2] 
https://github.com/postgres/postgres/commit/2910fc8239fa501b662c5459d7ba16a4bc35e7e8


(Apologies if my company's footer appears here)

** Cantab Capital Partners LLP is now named GAM Systematic LLP. Please note 
that our email addresses have changed from @cantabcapital.com to @gam.com.**

This email was sent by and on behalf of GAM Investments. GAM Investments is the 
corporate brand for GAM Holding AG and its direct and indirect subsidiaries. 
These companies may be referred to as ‘GAM’ or ‘GAM Investments’. In the United 
Kingdom, the business of GAM Investments is conducted by GAM (U.K.) Limited 
(No. 01664573) or one or more entities under the control of GAM (U.K.) Limited, 
including the following entities authorised and regulated by the Financial 
Conduct Authority: GAM International Management Limited (No. 01802911), GAM 
London Limited (No. 00874802), GAM Sterling Management Limited (No. 01750352), 
GAM Unit Trust Management Company Limited (No. 2873560) and GAM Systematic LLP 
(No. OC317557). GAM (U.K.) Limited and its regulated entities are registered in 
England and Wales. The registered office and principal place of business of GAM 
(U.K.) Limited and its regulated entities is at 8 Finsbury Circus, London, 
England, EC2M 7GB. The registered office of GAM Systematic LLP is at City 
House, Hills Road, Cambridge, CB2 1RE. This email, and any attachments, is 
confidential and may be privileged or otherwise protected from disclosure. It 
is intended solely for the stated addressee(s) and access to it by any other 
person is unauthorised. If you are not the intended recipient, you must not 
disclose, copy, circulate or in any other way use or rely on the information 
contained herein. If you have received this email in error, please inform us 
immediately and delete all copies of it. See - 
https://www.gam.com/en/legal/email-disclosures-eu/ for further information on 
confidentiality, the risks of non-secure electronic communication, and certain 
disclosures which we are required to make in accordance with applicable 
legislation and regulations. If you cannot access this link, please notify us 
by reply message and we will send the contents to you. GAM Investments will 
collect and use information about you in the course of your interactions with 
us. Full details about the data types we collect and what we use this for and 
your related rights is set out in our online privacy policy at 
https://www.gam.com/en/legal/privacy-policy. Please familiarise yourself with 
this policy and check it from time to time for updates as it supplements this 
notice.
diff --git a/contrib/btree_gist/Makefile b/contrib/btree_gist/Makefile
index a85db35e55..e92d974a1a 100644
--- a/contrib/btree_gist/Makefile
+++ b/contrib/btree_gist/Makefile
@@ -31,7 +31,8 @@ OBJS =  \
 EXTENSION = btree_gist
 DATA = btree_gist--1.0--1.1.sql \
btree_gist--1.1--1.2.sql btree_gist--1.2.sql btree_gist--1.2--1.3.sql \
-   btree_gist--1.3--1.4.sql btree_gist--1.4--1.5.sql
+   btree_gist--1.3--1.4.sql btree_gist--1.4--1.5.sql \
+   btree_gist--1.5--1.6.sql
 PGFILEDESC = "btree_gist - B-tree equivalent GiST operator classes"
 
 REGRESS = init int2 int4 int8 float4 float8 cash oid timestamp timestamptz \
diff --git