pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow setting MAX_PARTITION_BUFFERS to less than 2
Date: Tue, 30 Jul 2024 08:20:15 +0000
Message-ID: <E1sYi5f-001ray-9p@gemulon.postgresql.org> (raw)

Disallow setting MAX_PARTITION_BUFFERS to less than 2

Add some comments to mention that this value must be at least 2 and also
add a StaticAssertDecl to cause compilation failure if anyone tries to
build with an invalid value.

The multiInsertBuffers list must have at least two elements due to how the
code in CopyMultiInsertInfoFlush() pushes the current ResultRelInfo's
CopyMultiInsertBuffer to the end of the list.  If the first element is
also the last element, bad things will happen.

Author: Zhang Mingli <avamingli@gmail.com>
Discussion: https://postgr.es/m/CAApHDvpQ6t9ROcqbD-OgqR04Kfq4vQKw79Vo6r5j%2BciHwsSfkA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c19615fe391c9577e2129fed4429736f6b5295da

Modified Files
--------------
src/backend/commands/copyfrom.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)



Message-ID: <E1sYi5f-001ray-9p@gemulon.postgresql.org>
Permalink:  ../E1sYi5f-001ray-9p@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sYi5f-001ray-9p@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Disallow setting MAX_PARTITION_BUFFERS to less than 2
  In-Reply-To: <E1sYi5f-001ray-9p@gemulon.postgresql.org>

* 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