pg_basebackup-streamutil-fix.patch
text/x-patch
Filename: pg_basebackup-streamutil-fix.patch
Type: text/x-patch
Part: 1
Message:
Re: PQconninfo function for libpq
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/bin/pg_basebackup/streamutil.c | 6 | 6 |
--- postgresql.1.1/src/bin/pg_basebackup/streamutil.c.old 2012-11-22 13:57:09.954235023 +0100
+++ postgresql.1.1/src/bin/pg_basebackup/streamutil.c 2012-11-22 14:02:19.712243537 +0100
@@ -77,8 +77,8 @@
GetConnection(void)
{
PGconn *tmpconn;
- int argcount = 4; /* dbname, replication, fallback_app_name,
- * password */
+ int argcount = 7; /* dbname, replication, fallback_app_name,
+ * host, user, port, password */
int i;
const char **keywords;
const char **values;
@@ -133,15 +133,15 @@
* meaning this is the call for a second session to the same
* database, so just forcibly reuse that password.
*/
- keywords[argcount - 1] = "password";
- values[argcount - 1] = dbpassword;
+ keywords[i] = "password";
+ values[i] = dbpassword;
dbgetpassword = -1; /* Don't try again if this fails */
}
else if (dbgetpassword == 1)
{
password = simple_prompt(_("Password: "), 100, false);
- keywords[argcount - 1] = "password";
- values[argcount - 1] = password;
+ keywords[i] = "password";
+ values[i] = password;
}
tmpconn = PQconnectdbParams(keywords, values, true);