Skip to content

Commit 43d943d

Browse files
committed
Remove unneccesary version checks from pg_dump
Upstream has removed support for server versions older than 9.2.[1] The motivation for `error_unsupported_server_version` was to reduce diff footprint when upstream supported much older versions.[2] We still need to support GPDB5 (PostgreSQL 8.3), so remove version checks for PostgreSQL 8.2 and below. 1: postgres/postgres@30e7c17 2: bmdoil/gpdb@b4c5a61 Authored-by: Brent Doil <bdoil@vmware.com>
1 parent 94af1a2 commit 43d943d

4 files changed

Lines changed: 83 additions & 576 deletions

File tree

src/bin/pg_dump/common.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,8 @@ getSchemaData(Archive *fout, int *numTablesPtr)
186186
oprinfo = getOperators(fout, &numOperators);
187187
oprinfoindex = buildIndexArray(oprinfo, numOperators, sizeof(OprInfo));
188188

189-
if (testExtProtocolSupport(fout))
190-
{
191-
pg_log_info("reading user-defined external protocols");
192-
getExtProtocols(fout, &numExtProtocols);
193-
}
189+
pg_log_info("reading user-defined external protocols");
190+
getExtProtocols(fout, &numExtProtocols);
194191

195192
pg_log_info("reading user-defined access methods");
196193
getAccessMethods(fout, &numAccessMethods);

src/bin/pg_dump/dumputils.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -194,20 +194,6 @@ buildACLCommands(const char *name, const char *subname, const char *nspname,
194194
}
195195
}
196196

197-
/*
198-
* We still need some hacking though to cover the case where new default
199-
* public privileges are added in new versions: the REVOKE ALL will revoke
200-
* them, leading to behavior different from what the old version had,
201-
* which is generally not what's wanted. So add back default privs if the
202-
* source database is too old to have had that particular priv.
203-
*/
204-
if (remoteVersion < 80200 && strcmp(type, "DATABASE") == 0)
205-
{
206-
/* database CONNECT priv didn't exist before 8.2 */
207-
appendPQExpBuffer(firstsql, "%sGRANT CONNECT ON %s %s TO PUBLIC;\n",
208-
prefix, type, name);
209-
}
210-
211197
/* Scan individual ACL items */
212198
for (i = 0; i < naclitems; i++)
213199
{

0 commit comments

Comments
 (0)