pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anton Pikhteryev <apikhteryev@sandvine.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problem migrating from 8.0.3 to 8.2.3
Date: Mon, 19 Mar 2007 10:24:20 -0400
Message-ID: <F489AB573A749146B33461ECE080913A0108BEFE@EXCHANGE-1.sandvine.com> (raw)
In-Reply-To: <F489AB573A749146B33461ECE080913A0108BEF9@EXCHANGE-1.sandvine.com>
References: <F489AB573A749146B33461ECE080913A0108BEF4@EXCHANGE-1.sandvine.com>
	<7901.1174062531@sss.pgh.pa.us>
	<F489AB573A749146B33461ECE080913A0108BEF5@EXCHANGE-1.sandvine.com>
	<9806.1174073654@sss.pgh.pa.us>
	<F489AB573A749146B33461ECE080913A0108BEF9@EXCHANGE-1.sandvine.com>

BTW creating domain didn't throw any error on the destination server
(8.2.3), but I found that after migration permissions are not
consistent:

...
COMMENT
CREATE DOMAIN valid_user AS name DEFAULT "session_user"()
        CONSTRAINT user_exists CHECK (has_table_privilege(VALUE,
'pg_user'::text, 'SELECT'::text));
CREATE DOMAIN
ALTER DOMAIN public.valid_user OWNER TO labadmin;
ALTER DOMAIN
COMMENT ON DOMAIN valid_user IS 'valid PostgreSQL user name';
COMMENT
...

New server (8.2.3)

=> select has_table_privilege('mfgtest','clap_file_info','SELECT');
 has_table_privilege
---------------------
 f
(1 row)

Old one (8.0.3): 

# select has_table_privilege('mfgtest','clap_file_info','SELECT');
 has_table_privilege
---------------------
 t
(1 row)



Anton Pikhteryev
 

> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org 
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Anton 
> Pikhteryev
> Sent: Monday, March 19, 2007 9:52 AM
> To: Tom Lane
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Problem migrating from 8.0.3 to 8.2.3 
> 
> On the destination box:
> 
> #\dD+ valid_user
>                                                        List of domains
>  Schema |    Name    | Type |         Modifier         |
> Check
> --------+------------+------+--------------------------+------
> ----------
> -----------------------------------------------------
>  public | valid_user | name | default "session_user"() | 
> CHECK (has_table_privilege(VALUE, 'pg_user'::text, 'SELECT'::text))
> (1 row)
> 
> On the source:
> 
> # \dD+ valid_user
>                     List of domains
>  Schema |    Name    | Type |         Modifier
> --------+------------+------+--------------------------
>  public | valid_user | name | default "session_user"()
> (1 row)
> 
> 
> I created valid_user domain on the old system (8.0.3) a long time ago
> as:
> 
> CREATE DOMAIN valid_user
>     AS name     -- pg_catalog.pg_user.usename%TYPE
>     DEFAULT SESSION_USER
>     CONSTRAINT user_exists
>         CHECK (has_table_privilege(VALUE,'pg_user','SELECT'));
> COMMENT ON DOMAIN valid_user IS 'valid PostgreSQL user name';
> 
> I was also thinking that there is no need to recreate the 
> domain again as a part of migration and hoping that 
> pg_dumpall will take care of it.
> 
> 
> 
> Anton Pikhteryev
>  
>  
> 
> > -----Original Message-----
> > From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> > Sent: Friday, March 16, 2007 3:34 PM
> > To: Anton Pikhteryev
> > Cc: pgsql-admin@postgresql.org
> > Subject: Re: [ADMIN] Problem migrating from 8.0.3 to 8.2.3
> > 
> > "Anton Pikhteryev" <apikhteryev@sandvine.com> writes:
> > > There is that part and doesn't have any errors:
> > > CREATE TABLE clap_file_info (
> > >     fileid integer DEFAULT
> > > nextval('public.clap_file_info_fileid_seq'::text) NOT NULL,
> > >     filename text NOT NULL,
> > >     created timestamp with time zone DEFAULT
> > > ('now'::text)::timestamp(6) with time zone NOT NULL,
> > >     "owner" valid_user NOT NULL
> > > );
> > 
> > What is a valid_user?  (No, I don't want \dT output, I want the 
> > definition of the type.)
> > 
> > 			regards, tom lane
> > 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 



view thread (8+ messages)  latest in thread

Message-ID: <F489AB573A749146B33461ECE080913A0108BEFE@EXCHANGE-1.sandvine.com>
Permalink:  ../F489AB573A749146B33461ECE080913A0108BEFE@EXCHANGE-1.sandvine.com/
Also on:    postgresql.org/message-id/F489AB573A749146B33461ECE080913A0108BEFE@EXCHANGE-1.sandvine.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: apikhteryev@sandvine.com, tgl@sss.pgh.pa.us
  Subject: Re: Problem migrating from 8.0.3 to 8.2.3
  In-Reply-To: <F489AB573A749146B33461ECE080913A0108BEFE@EXCHANGE-1.sandvine.com>
  References: <F489AB573A749146B33461ECE080913A0108BEF4@EXCHANGE-1.sandvine.com> <7901.1174062531@sss.pgh.pa.us> <F489AB573A749146B33461ECE080913A0108BEF5@EXCHANGE-1.sandvine.com> <9806.1174073654@sss.pgh.pa.us> <F489AB573A749146B33461ECE080913A0108BEF9@EXCHANGE-1.sandvine.com> <F489AB573A749146B33461ECE080913A0108BEFE@EXCHANGE-1.sandvine.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox