Re: pg_dump getBlobs query broken for 7.3 servers

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump getBlobs query broken for 7.3 servers
Date: 2016-10-07 04:19:28
Message-ID: 70a5d7d2-c26f-c168-2486-5caf4215fa42@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016/10/07 11:47, Amit Langote wrote:
> Just noticed that the getBlobs() query does not work for a 7.3 server
> (maybe <= 7.3) due to the following change in commit 23f34fa4 [1]:
>
> else if (fout->remoteVersion >= 70100)
> appendPQExpBufferStr(blobQry,
> - "SELECT DISTINCT loid, NULL::oid, NULL::oid"
> + "SELECT DISTINCT loid, NULL::oid, NULL, "
> + "NULL AS rlomacl, NULL AS initlomacl, "
> + "NULL AS initrlomacl "
> " FROM pg_largeobject");
> else
> appendPQExpBufferStr(blobQry,
> - "SELECT oid, NULL::oid, NULL::oid"
> + "SELECT oid, NULL::oid, NULL, "
> + "NULL AS rlomacl, NULL AS initlomacl, "
> + "NULL AS initrlomacl "
> " FROM pg_class WHERE relkind = 'l'");
>
> The following error is reported by the server:
>
> pg_dump: [archiver (db)] query failed: ERROR: Unable to identify an
> ordering operator '<' for type '"unknown"'
> Use an explicit ordering operator or modify the query
> pg_dump: [archiver (db)] query was: SELECT DISTINCT loid, NULL::oid, NULL,
> NULL AS rlomacl, NULL AS initlomacl, NULL AS initrlomacl FROM pg_largeobject
>
> I could fix that using the attached patch.

Forgot to mention that it needs to be fixed in both HEAD and 9.6.

Thanks,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2016-10-07 06:16:40 Parallel bitmap heap scan
Previous Message Alfred Perlstein 2016-10-07 03:55:32 Re: pgbench vs. wait events