pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tels <nospam-pg-abuse@bloodgate.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Rafia Sabih <rafia.sabih@enterprisedb.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] [POC] Faster processing at Gather node
Date: Thu, 29 Mar 2018 12:18:43 -0400
Message-ID: <20180329161843.GC16165@momjian.us> (raw)
In-Reply-To: <e66e05bc55f5ce904e361ad17a3395ae.squirrel@sm.webmail.pair.com>
References: <CAA4eK1LSDydwrNjmYSNkfJ3ZivGSWH9SVswh6QpNzsMdj_oOQA@mail.gmail.com>
	<CA+TgmobL3rzeo7XrYbat4FHR=L9+ZA4ZmzjxCvTwa-NBR=O_Sw@mail.gmail.com>
	<20180110000934.lft7ebeqek4grrlx@alap3.anarazel.de>
	<CA+Tgmob=kOVeaw3v-OCRPbmtK1qHhu3uvHV6ANxoB2xZuir_=Q@mail.gmail.com>
	<20180207184137.5mv4bipj3t7hbncv@alap3.anarazel.de>
	<CA+TgmobkN-g10qNU4-qPApAPG9w7euFJgU1Y-TGtXr9TUeZ3=w@mail.gmail.com>
	<20180227210638.caug5j5po4xk5ktf@alap3.anarazel.de>
	<CA+Tgmob2c7LVijbpWoMOBvxkZjaJ_E7ZesKKJoHTfAL1B1PYag@mail.gmail.com>
	<CA+TgmoZG_6PK5F7jd9rv0P5u4bweLm4X=3oYq5P5iYwtdtikEw@mail.gmail.com>
	<e66e05bc55f5ce904e361ad17a3395ae.squirrel@sm.webmail.pair.com>

On Fri, Mar  2, 2018 at 05:21:28PM -0500, Tels wrote:
> Hello Robert,
> 
> On Fri, March 2, 2018 12:22 pm, Robert Haas wrote:
> > On Wed, Feb 28, 2018 at 10:06 AM, Robert Haas <robertmhaas@gmail.com>
> > wrote:
> >> [ latest patches ]
> >
> > Committed.  Thanks for the review.
> 
> Cool :)
> 
> There is a typo, tho:
> 
> +	/*
> +	 * If the counterpary is known to have attached, we can read mq_receiver
> +	 * without acquiring the spinlock and assume it isn't NULL.  Otherwise,
> +	 * more caution is needed.
> +	 */
> 
> s/counterpary/counterparty/;
> 
> Sorry, only noticed while re-reading the thread.
> 
> Also, either a double space is missing, or one is too many:
> 
> +	/*
> +	 * Separate prior reads of mq_ring from the increment of mq_bytes_read
> +	 * which follows.  Pairs with the full barrier in shm_mq_send_bytes(). We
> +	 * only need a read barrier here because the increment of mq_bytes_read is
> +	 * actually a read followed by a dependent write.
> +	 */
> 
> ("  Pairs ..." vs. ". We only ...")
> 
> Best regards,

Change applied with the attached patch.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

Attachments:

shm.diff (text/x-diff, 1.5K) download diff --git a/src/backend/storage/ipc/shm_mq.c b/src/backend/storage/ipc/shm_mq.c new file mode 100644 index 3faace2..c80cb6e *** a/src/backend/storage/ipc/shm_mq.c --- b/src/backend/storage/ipc/shm_mq.c *************** shm_mq_sendv(shm_mq_handle *mqh, shm_mq_ *** 493,499 **** return SHM_MQ_DETACHED; /* ! * If the counterpary is known to have attached, we can read mq_receiver * without acquiring the spinlock and assume it isn't NULL. Otherwise, * more caution is needed. */ --- 493,499 ---- return SHM_MQ_DETACHED; /* ! * If the counterparty is known to have attached, we can read mq_receiver * without acquiring the spinlock and assume it isn't NULL. Otherwise, * more caution is needed. */ *************** shm_mq_inc_bytes_read(shm_mq *mq, Size n *** 1203,1211 **** /* * Separate prior reads of mq_ring from the increment of mq_bytes_read ! * which follows. Pairs with the full barrier in shm_mq_send_bytes(). We ! * only need a read barrier here because the increment of mq_bytes_read is ! * actually a read followed by a dependent write. */ pg_read_barrier(); --- 1203,1211 ---- /* * Separate prior reads of mq_ring from the increment of mq_bytes_read ! * which follows. This pairs with the full barrier in shm_mq_send_bytes(). ! * We only need a read barrier here because the increment of mq_bytes_read ! * is actually a read followed by a dependent write. */ pg_read_barrier();

view thread (64+ messages)

Message-ID: <20180329161843.GC16165@momjian.us>
Permalink:  ../20180329161843.GC16165@momjian.us/
Also on:    postgresql.org/message-id/20180329161843.GC16165@momjian.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: bruce@momjian.us, nospam-pg-abuse@bloodgate.com, robertmhaas@gmail.com, andres@anarazel.de, amit.kapila16@gmail.com, rafia.sabih@enterprisedb.com
  Subject: Re: [HACKERS] [POC] Faster processing at Gather node
  In-Reply-To: <20180329161843.GC16165@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox