From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error |
Date: | 2023-02-06 10:11:32 |
Message-ID: | 20230206101132.3oge5d5ovoirvxhb@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I'm writing my own patch for this problem. While playing around with
it, I noticed this:
struct Command {
PQExpBufferData lines; /* 0 24 */
char * first_line; /* 24 8 */
int type; /* 32 4 */
MetaCommand meta; /* 36 4 */
int argc; /* 40 4 */
/* XXX 4 bytes hole, try to pack */
char * argv[256]; /* 48 2048 */
/* --- cacheline 32 boundary (2048 bytes) was 48 bytes ago --- */
char * varprefix; /* 2096 8 */
PgBenchExpr * expr; /* 2104 8 */
/* --- cacheline 33 boundary (2112 bytes) --- */
SimpleStats stats; /* 2112 40 */
int64 retries; /* 2152 8 */
int64 failures; /* 2160 8 */
/* size: 2168, cachelines: 34, members: 11 */
/* sum members: 2164, holes: 1, sum holes: 4 */
/* last cacheline: 56 bytes */
};
Not great. I suppose this makes pgbench slower than it needs to be.
Can we do better?
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2023-02-06 10:11:54 | Re: Consolidate ItemPointer to Datum conversion functions |
Previous Message | Peter Eisentraut | 2023-02-06 09:54:07 | Consolidate ItemPointer to Datum conversion functions |