forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf1516ad
committed
pgbench: Simplify some port, host, user and dbname assignments
Using pgbench in an environment with both PGPORT and PGUSER set wouldhave caused the generation of a debug log with an incorrect databasename due to an oversight in412893b. Not specifying user, port and/ordatabase using the option switches, without their respective environmentvariables, generated a log entry with empty strings, which wasrather useless.This commit fixes this set of issues by simplifying the logic grabbingthe connection information, removing a set of getenv() calls thatemulated what libpq already does. The faulty debug log now directlyuses the information from the libpq connection, and it gets generatedafter the connection to the backend is completed, not before it (in theevent of a failure libpq would complain with more information about theconnection attempt so the log is not really useful before anyway).Author: Kota MiyakeReviewed-by: Fujii Masao, Michael PaquierDiscussion:https://postgr.es/m/026b3ae6fc339a18394d053c32a4463d@oss.nttdata.com1 parent0ce4cd0 commitf1516ad
1 file changed
+15
-21
lines changedLines changed: 15 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
63 | 64 |
| |
64 | 65 |
| |
65 | 66 |
| |
| |||
240 | 241 |
| |
241 | 242 |
| |
242 | 243 |
| |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
247 | 248 |
| |
248 | 249 |
| |
249 | 250 |
| |
| |||
1191 | 1192 |
| |
1192 | 1193 |
| |
1193 | 1194 |
| |
1194 |
| - | |
| 1195 | + | |
1195 | 1196 |
| |
1196 | 1197 |
| |
1197 | 1198 |
| |
| |||
5483 | 5484 |
| |
5484 | 5485 |
| |
5485 | 5486 |
| |
5486 |
| - | |
5487 |
| - | |
5488 |
| - | |
5489 |
| - | |
5490 |
| - | |
5491 |
| - | |
5492 |
| - | |
5493 | 5487 |
| |
5494 | 5488 |
| |
5495 | 5489 |
| |
| |||
5610 | 5604 |
| |
5611 | 5605 |
| |
5612 | 5606 |
| |
5613 |
| - | |
| 5607 | + | |
5614 | 5608 |
| |
5615 | 5609 |
| |
5616 | 5610 |
| |
| |||
5860 | 5854 |
| |
5861 | 5855 |
| |
5862 | 5856 |
| |
5863 |
| - | |
5864 |
| - | |
| 5857 | + | |
| 5858 | + | |
5865 | 5859 |
| |
5866 |
| - | |
| 5860 | + | |
5867 | 5861 |
| |
5868 | 5862 |
| |
5869 | 5863 |
| |
| |||
6026 | 6020 |
| |
6027 | 6021 |
| |
6028 | 6022 |
| |
6029 |
| - | |
6030 |
| - | |
6031 |
| - | |
6032 |
| - | |
6033 |
| - | |
6034 | 6023 |
| |
6035 | 6024 |
| |
6036 | 6025 |
| |
6037 | 6026 |
| |
6038 | 6027 |
| |
| 6028 | + | |
| 6029 | + | |
| 6030 | + | |
| 6031 | + | |
| 6032 | + | |
6039 | 6033 |
| |
6040 | 6034 |
| |
6041 | 6035 |
| |
|
0 commit comments
Comments
(0)