[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: [HACKERS] pg_dump bug in 9.4beta2 and HEAD
From: Pavel Stehule <pavel.stehule () gmail ! com>
Date: 2014-09-30 17:07:55
Message-ID: CAFj8pRBi8B1TyiSMs62_8NGH3W6pjvf-gmuc3n0RW_c2wDAoww () mail ! gmail ! com
[Download RAW message or body]
2014-09-30 17:18 GMT+02:00 Alvaro Herrera <alvherre@2ndquadrant.com>:
>
> I have pushed this fix, except that instead of parsing the OID from the
> dropStmt as in your patch, I used te->catalogId.oid, which is much
> simpler.
>
yes, it is much better
>
> I tested this by pg_restoring to 8.4 (which doesn't have
> pg_largeobject_metadata); there is no error raised:
>
> LOG: sentencia: SELECT CASE WHEN EXISTS(SELECT 1 FROM
> pg_catalog.pg_largeobject WHERE loid = '43748') THEN
> pg_catalog.lo_unlink('43748') END;
>
> In 9.0 the command is the new style:
>
> LOG: sentencia: SELECT pg_catalog.lo_unlink(oid) FROM
> pg_catalog.pg_largeobject_metadata WHERE oid = '43748';
>
> So it's all fine. I guess it's fortunate that we already had the
> DropBlobIfExists() function.
>
> Now a further problem I notice is all the *other* commands for which we
> inject the IF EXISTS clause; there is no support for those in older
> servers, so they throw errors if --if-exists is given in the pg_restore
> line. I think we can just say that --if-exists is not supported for
> older servers; as Heikki said, we don't promise that pg_dump is
> compatible with older servers anyway. In my test database, several
> commands errored out when seeing the EXTENSION in CREATE EXTENSION IF
> EXISTS.
> So we're okay now.
>
great,
Thank you very much
Pavel
>
> --
> Álvaro Herrera http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
>
[Attachment #3 (text/html)]
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2014-09-30 \
17:18 GMT+02:00 Alvaro Herrera <span dir="ltr"><<a \
href="mailto:alvherre@2ndquadrant.com" \
target="_blank">alvherre@2ndquadrant.com</a>></span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><br> I have pushed this fix, except that instead of parsing \
the OID from the<br> dropStmt as in your patch, I used te->catalogId.oid, which is \
much<br> simpler.<br></blockquote><div><br></div><div>yes, it is much \
better<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
I tested this by pg_restoring to 8.4 (which doesn't have<br>
pg_largeobject_metadata); there is no error raised:<br>
<br>
LOG: sentencia: SELECT CASE WHEN EXISTS(SELECT 1 FROM pg_catalog.pg_largeobject \
WHERE loid = '43748') THEN pg_catalog.lo_unlink('43748') END;<br> \
<br> In 9.0 the command is the new style:<br>
<br>
LOG: sentencia: SELECT pg_catalog.lo_unlink(oid) FROM \
pg_catalog.pg_largeobject_metadata WHERE oid = '43748';<br> <br>
So it's all fine. I guess it's fortunate that we already had the<br>
DropBlobIfExists() function.<br>
<br>
Now a further problem I notice is all the *other* commands for which we<br>
inject the IF EXISTS clause; there is no support for those in older<br>
servers, so they throw errors if --if-exists is given in the pg_restore<br>
line. I think we can just say that --if-exists is not supported for<br>
older servers; as Heikki said, we don't promise that pg_dump is<br>
compatible with older servers anyway. In my test database, several<br>
commands errored out when seeing the EXTENSION in CREATE EXTENSION IF EXISTS.<br>
So we're okay now.<br></blockquote><div><br></div><div>great,<br><br></div><div>Thank \
you very much<br><br></div><div>Pavel<br></div><div><br></div><div> \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div class="HOEnZb"><div class="h5"><br>
--<br>
Álvaro Herrera <a href="http://www.2ndQuadrant.com/" \
target="_blank">http://www.2ndQuadrant.com/</a><br> PostgreSQL Development, 24x7 \
Support, Training & Services<br> </div></div></blockquote></div><br></div></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic