On Tue, Feb 18, 2020 at 6:51 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > I am talking about access to shared memory instead of the process > local memory. I understand that an extra copy won't be required.
You make it sound like there is some performance penalty for accessing shared memory, but I don't think that's true. It's true that *contended* access to shared memory can be slower, because if multiple processes are trying to access the same memory, and especially if multiple processes are trying to write the same memory, then the cache lines have to be shared and that has a cost. However, I don't think that would create any noticeable effect in this case. First, there's presumably only one writer process. Second, you wouldn't normally have multiple readers working on the same part of the data at the same time. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company