pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pgbench: Allow the transaction log file prefix to be changed.
6+ messages / 4 participants
[nested] [flat]

* pgsql: pgbench: Allow the transaction log file prefix to be changed.
@ 2016-11-09 21:34 Robert Haas <rhaas@postgresql.org>
  2016-11-09 21:51 ` Re: pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Robert Haas @ 2016-11-09 21:34 UTC (permalink / raw)
  To: pgsql-committers

pgbench: Allow the transaction log file prefix to be changed.

Masahiko Sawada, reviewed by Fabien Coelho and Beena Emerson, with
some a bit of wordsmithing and cosmetic adjustment by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/41124a91e61fc6d9681c1e8b15ba30494e84d643

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 26 +++++++++++++++++++-------
src/bin/pgbench/pgbench.c     | 20 ++++++++++++++++++--
2 files changed, 37 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pgsql: pgbench: Allow the transaction log file prefix to be changed.
  2016-11-09 21:34 pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <rhaas@postgresql.org>
@ 2016-11-09 21:51 ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-11-10 00:03   ` Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2016-11-09 21:51 UTC (permalink / raw)
  To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers

Robert Haas <rhaas@postgresql.org> writes:
> pgbench: Allow the transaction log file prefix to be changed.

Perhaps the "logpath" buffer that the filename is constructed in
needs to be made bigger.  64 bytes was obviously enough with the
old pattern, but it's not with the new.

			regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed.
  2016-11-09 21:34 pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <rhaas@postgresql.org>
  2016-11-09 21:51 ` Re: pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-11-10 00:03   ` Robert Haas <robertmhaas@gmail.com>
  2016-11-10 03:08     ` Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 6+ messages in thread

From: Robert Haas @ 2016-11-10 00:03 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

On Wed, Nov 9, 2016 at 4:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <rhaas@postgresql.org> writes:
>> pgbench: Allow the transaction log file prefix to be changed.
>
> Perhaps the "logpath" buffer that the filename is constructed in
> needs to be made bigger.  64 bytes was obviously enough with the
> old pattern, but it's not with the new.

Oops, yes, that seems like a good idea.  How about 64 -> MAXPGPATH?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed.
  2016-11-09 21:34 pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <rhaas@postgresql.org>
  2016-11-09 21:51 ` Re: pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
  2016-11-10 00:03   ` Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <robertmhaas@gmail.com>
@ 2016-11-10 03:08     ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-11-10 03:12       ` Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Michael Paquier <michael.paquier@gmail.com>
  2016-11-10 04:17       ` Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <robertmhaas@gmail.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Tom Lane @ 2016-11-10 03:08 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Nov 9, 2016 at 4:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Perhaps the "logpath" buffer that the filename is constructed in
>> needs to be made bigger.  64 bytes was obviously enough with the
>> old pattern, but it's not with the new.

> Oops, yes, that seems like a good idea.  How about 64 -> MAXPGPATH?

If we want to stick with the fixed-size-buffer-on-stack approach,
that would be the thing to use.  psprintf is another possibility,
though that would add a malloc/free cycle.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed.
  2016-11-09 21:34 pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <rhaas@postgresql.org>
  2016-11-09 21:51 ` Re: pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
  2016-11-10 00:03   ` Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <robertmhaas@gmail.com>
  2016-11-10 03:08     ` Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-11-10 03:12       ` Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2016-11-10 03:12 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Robert Haas <robertmhaas@gmail.com>; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

On Thu, Nov 10, 2016 at 12:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Nov 9, 2016 at 4:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Perhaps the "logpath" buffer that the filename is constructed in
>>> needs to be made bigger.  64 bytes was obviously enough with the
>>> old pattern, but it's not with the new.
>
>> Oops, yes, that seems like a good idea.  How about 64 -> MAXPGPATH?
>
> If we want to stick with the fixed-size-buffer-on-stack approach,
> that would be the thing to use.  psprintf is another possibility,
> though that would add a malloc/free cycle.

MAXPGPATH is used quite a lot in the binaries of src/bin/, just using
that seems fine to me.. My 2c.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed.
  2016-11-09 21:34 pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <rhaas@postgresql.org>
  2016-11-09 21:51 ` Re: pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
  2016-11-10 00:03   ` Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <robertmhaas@gmail.com>
  2016-11-10 03:08     ` Re: Re: [COMMITTERS] pgsql: pgbench: Allow the transaction log file prefix to be changed. Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-11-10 04:17       ` Robert Haas <robertmhaas@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Robert Haas @ 2016-11-10 04:17 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>

On Wed, Nov 9, 2016 at 10:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Nov 9, 2016 at 4:51 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Perhaps the "logpath" buffer that the filename is constructed in
>>> needs to be made bigger.  64 bytes was obviously enough with the
>>> old pattern, but it's not with the new.
>
>> Oops, yes, that seems like a good idea.  How about 64 -> MAXPGPATH?
>
> If we want to stick with the fixed-size-buffer-on-stack approach,
> that would be the thing to use.  psprintf is another possibility,
> though that would add a malloc/free cycle.

I don't think the performance cost of a malloc/free cycle would be
noticeable, but I don't see much point in it, either.  It's likely
that, if you hadn't notice this by inspection, we could have gone a
few years before anyone ran afoul of the 64-character limit.  Now,
MAXPGPATH is 1024, and I do not know too many people who have a real
need for pathnames over 1024 characters.  I think we may as well just
keep it simple.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2016-11-10 04:17 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09 21:34 pgsql: pgbench: Allow the transaction log file prefix to be changed. Robert Haas <rhaas@postgresql.org>
2016-11-09 21:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-11-10 00:03   ` Robert Haas <robertmhaas@gmail.com>
2016-11-10 03:08     ` Tom Lane <tgl@sss.pgh.pa.us>
2016-11-10 03:12       ` Michael Paquier <michael.paquier@gmail.com>
2016-11-10 04:17       ` Robert Haas <robertmhaas@gmail.com>

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