Hi al In getDefaultACLs function, some PQExpBuffer are not destroy
File: src/bin/pg_dump/pg_dump.c
DefaultACLInfo *
getDefaultACLs(Archive *fout, int *numDefaultACLs)
{
......
if (fout->remoteVersion >= 90600)
{
PQExpBuffer acl_subquery = createPQExpBuffer(); // ***
acl_subquery not destroyed ***
PQExpBuffer racl_subquery = createPQExpBuffer(); // ***
racl_subquery not destroyed ***
PQExpBuffer initacl_subquery = createPQExpBuffer(); // ***
initacl_subquery not destroyed ***
PQExpBuffer initracl_subquery = createPQExpBuffer(); // ***
initracl_subquery not destroyed ***
buildACLQueries(acl_subquery, racl_subquery, initacl_subquery,
initracl_subquery, "defaclacl",
"defaclrole",
"CASE WHEN defaclobjtype = 'S'
THEN 's' ELSE defaclobjtype END::\"char\"",
dopt->binary_upgrade);
appendPQExpBuffer(query, "SELECT d.oid, d.tableoid, "
"(%s d.defaclrole) AS
defaclrole, "
"d.defaclnamespace, "
"d.defaclobjtype, "
"%s AS defaclacl, "
"%s AS rdefaclacl, "
"%s AS initdefaclacl, "
"%s AS initrdefaclacl "
"FROM pg_default_acl d "
"LEFT JOIN pg_init_privs pip
ON "
"(d.oid = pip.objoid "
"AND pip.classoid =
'pg_default_acl'::regclass "
"AND pip.objsubid = 0) ",
username_subquery,
acl_subquery->data,
racl_subquery->data,
initacl_subquery->data,
initracl_subquery->data);
}
......
Here is a patch.
Best Regards!
pg_dump.patch
Description: pg_dump.patch
