On Fri, Nov 14, 2025 at 8:51 PM Boris Mironov <[email protected]> wrote: > > Hi Ashutosh, > > > If there is one method that is better than all others, community will > > be more willing to accept implementation of that one method than > > multiple implementations so as to reduce maintenance burden. > > Ok then. I'll leave "COPY FROM STDIN BINARY" implementation out of 3 only. > Would you prefer to replace original COPY FROM STDIN TEXT by this > code or add it as new "init-step" (e.g., with code "c")? >
TEXT copy may be useful for cross platform client side data generation. BINARY might be useful for same platform client side generation or server side generation. Just a thought, use TEXT or BINARY automatically based on where it's cross-platform or same platform setup. > I also have noted that current code doesn't prevent pgbench parameter > like "--init-steps=dtgG". It allows to run data generation step twice. > Each of these "g" and "G" will present own timing in status line. Is this > an oversight or intentional? > I would review the commit a386942bd29b0ef0c9df061392659880d22cdf43 and the discussion thread https://postgr.es/m/alpine.DEB.2.21.1904061826420.3678@lancre mentioned in the commit message to find that out. At first glance it looks like an oversight, but I haven't reviewed the commit and thread myself. That thread might reveal why generate_series() was used instead of BINARY COPY for server side data generation. If it needs to change it's better to start a separate thread and separate patch for that discussion. -- Best Wishes, Ashutosh Bapat
