Re: Bug in pg_dump in 7.4.6?

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: Bug in pg_dump in 7.4.6?
Date: 2005-01-12 04:57:42
Message-ID: 87oefv1by1.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > 7.4.6 pg_dump seems to be inserting a lot more SET SESSION
> > AUTHORIZATION lines than previously.
>
> By "previously" do you mean 7.4.5 or thereabouts?

I think I went from 7.4.2 to 7.4.6. But I'm having trouble finding any records
to back this up. postgres.log doesn't include the version when it starts up,
and debian's installer tool doesn't leave an audit trail of upgrades
(something that I've often been annoyed at).

> I can't recall any late-7.4.* changes that might affect this. pg_dump is
> supposed to optimize away redundant SET SESSION AUTH commands. Can you give
> a specific example of what you are seeing?

I'm sorry, I have to remove the actual identifiers from the schema excerpt
before posting it. I replaced everything interesting by ellipses below. It
seems the spurious SET SESSION AUTHORIZATION commands appear after any
REVOKE/GRANT pair.

SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT,UPDATE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: TABLE; Schema: public; Owner: dbo
CREATE TABLE ... (
...
);
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT,UPDATE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT,UPDATE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: TABLE; Schema: public; Owner: dbo
CREATE TABLE ... (
...
);
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT INSERT,SELECT,UPDATE,DELETE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT,UPDATE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: TABLE; Schema: public; Owner: dbo
CREATE TABLE ... (
...
);
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT INSERT,SELECT,UPDATE,DELETE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT,UPDATE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: TABLE; Schema: public; Owner: dbo
CREATE TABLE ... (
...
);
-- Name: ...; Type: ACL; Schema: public; Owner: dbo
REVOKE ALL ON TABLE ... FROM PUBLIC;
GRANT SELECT,UPDATE ON TABLE ... TO dbuser;
SET SESSION AUTHORIZATION 'dbo';
-- Name: ...; Type: SEQUENCE; Schema: public; Owner: dbo
CREATE SEQUENCE ...
...

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Colombo 2005-01-12 09:32:25 Re: Interval Question
Previous Message Ed L. 2005-01-12 04:02:29 Re: plpgsql/rule question