forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6ec578e
committed
Remove setvbuf() call from PQtrace()
It's misplaced there -- it's not libpq's output stream to tweak in thatway. In particular, POSIX says that it has to be called before anyother operation on the file, so if a stream previously used by thecalling application, bad things may happen.Put setvbuf() in libpq_pipeline for good measure.Also, reduce fopen(..., "w+") to just fopen(..., "w") inlibpq_pipeline.c. It's not clear that this fixes anything, but we don'tuse w+ anywhere.Per complaints from Tom Lane.Discussion:https://postgr.es/m/3337422.1617229905@sss.pgh.pa.us1 parentaba24b5 commit6ec578e
File tree
2 files changed
+5
-4
lines changed- src
- interfaces/libpq
- test/modules/libpq_pipeline
2 files changed
+5
-4
lines changedLines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
44 |
| - | |
45 | 43 |
| |
46 | 44 |
| |
47 | 45 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1319 | 1319 |
| |
1320 | 1320 |
| |
1321 | 1321 |
| |
1322 |
| - | |
1323 |
| - | |
| 1322 | + | |
1324 | 1323 |
| |
1325 | 1324 |
| |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1326 | 1329 |
| |
1327 | 1330 |
| |
1328 | 1331 |
| |
|
0 commit comments
Comments
(0)