Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtCxe-00BKcB-OW for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Oct 2023 20:16:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qtCxc-008d3T-H9 for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Oct 2023 20:16:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qtCxc-008d1n-8b for pgsql-bugs@lists.postgresql.org; Wed, 18 Oct 2023 20:16:08 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qtCxW-00190F-0L for pgsql-bugs@lists.postgresql.org; Wed, 18 Oct 2023 20:16:07 +0000 Received: by mail-wr1-x443.google.com with SMTP id ffacd0b85a97d-307d58b3efbso5626872f8f.0 for ; Wed, 18 Oct 2023 13:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1697660160; x=1698264960; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=LLLEJhLXjW60OYV+otHm83K7pZ6wxlfaa8YpU/XOl1I=; b=N1DK66t2ypJZ8b2cJMKy+q4Ps4/yRFcpXKWZbijmggaCzx6V982asmwBMz+pUHONZW GwmZJ7T7PzpLMq+U/t5xr3q1/rhacxSPSlTPXPASI9QOv5tpMLR8VjPwIL13b2qEXggk h9vFnqV71xnK/g24e246hpokNVghwF6LQn5iQwLmuqgNeC8MOONbbqYN2EpmU00r1yz5 tlHqsK4xN40UvNe+o4OVrrf9uf4eioYfXE6oWznnI/Z8pBzQNJVbHvORdbQcsymP16Le pCPCxXguU2o1sG7gZ6D78ttIvfpBnCTfmpuFI45QE7tLr/I5J1G+zVuYuI9t2pciSWJD MwOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697660160; x=1698264960; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LLLEJhLXjW60OYV+otHm83K7pZ6wxlfaa8YpU/XOl1I=; b=Y491aVFvPC6e9/rQ8JA0dD3mj/0v1UZe4b5+pGp5CkUKGeuBvA731ND4FvXnJc5jME FXQ83/xer+dOAbrQJVwBb//Fw2gP30lQ2CpaY1P4HKSFwC5J5XfyMr8rD3WPzPCAQh6N /UBwwB2MZ0MQvhyvKY7s/YVm73X+lBQLtXQXEZgzWTQrBEahY2QQKik01l833Es4YEGn K4AxWh9ImlH1FvB4GjcCEZmUs2r3RYV1Jy60HaaUTdTfQ/dI/ZgX6vdgd7iDd1+D+Id/ 2uT347aNkcs3M7edSUZjN8i7XWhcUsr8t2BgZAHaaNn1WEmf4hz0Z0K7WLriHs1PqR3r TQ9A== X-Gm-Message-State: AOJu0YxSck4hdVE8COvctfRmMkQpvZO+yDk9o+AlonxSmdRlSknZcCne nLUyZgEU3NQFFynJIXx3wnpezuSOwCGlYhNr0ebf1dNg X-Google-Smtp-Source: AGHT+IGuafCJ4Hz/jv7uJCop3HWmCpNw5+VGzR66YHp2gUV0aQhRp3pT5JRv84+dwY9StLeBQMA++w== X-Received: by 2002:a5d:4712:0:b0:32d:a435:3ec3 with SMTP id y18-20020a5d4712000000b0032da4353ec3mr110426wrq.4.1697660159392; Wed, 18 Oct 2023 13:15:59 -0700 (PDT) Received: from localhost.localdomain ([2001:871:260:ccee:ff5d:296a:ef88:dd9e]) by smtp.gmail.com with ESMTPSA id k3-20020a5d4283000000b003232f167df5sm2814092wrq.108.2023.10.18.13.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 13:15:59 -0700 (PDT) Message-ID: <4b4ff8f5427479f6160a625f70543b3f76cab4d3.camel@cybertec.at> Subject: Re: BUG #18160: first create table show "ERROR: permission denied for schema public", next create table works From: Laurenz Albe To: pawel.ziewiecki@gmail.com, pgsql-bugs@lists.postgresql.org Date: Wed, 18 Oct 2023 22:15:58 +0200 In-Reply-To: <18160-ccc671c5c94fce11@postgresql.org> References: <18160-ccc671c5c94fce11@postgresql.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2023-10-18 at 17:01 +0000, PG Bug reporting form wrote: > The following bug has been logged on the website: >=20 > Bug reference:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 18160 > Logged by:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Pawel Zi= ewiecki > Email address:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pawel.ziewiecki@gmail.com > PostgreSQL version: 15.3 > Operating system:=C2=A0=C2=A0 aws rds postgresql > Description:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=20 >=20 > create table (failed) + alter table (table not exist) + create table succ= ess > in public schema (?) >=20 > psql -h database-imenago.cahxcxwmeghl.eu-central-1.rds.amazonaws.com -p 5= 432 > -U postgres > Password for user postgres: > psql (15.4 (Debian 15.4-1.pgdg120+1), server 15.3) > SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, > compression: off) > Type "help" for help. >=20 > postgres=3D> create user u1 with createdb password 'u1pwd'; > CREATE ROLE > postgres=3D> \c postgres u1 > Password for user u1: > psql (15.4 (Debian 15.4-1.pgdg120+1), server 15.3) > SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, > compression: off) > You are now connected to database "postgres" as user "u1". > postgres=3D> create database u1db with owner u1; > CREATE DATABASE > postgres=3D> \c u1db > psql (15.4 (Debian 15.4-1.pgdg120+1), server 15.3) > SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, > compression: off) > You are now connected to database "u1db" as user "u1". > u1db=3D> create table public.t1 (id int); > ERROR:=C2=A0 permission denied for schema public > LINE 1: create table public.t1 (id int); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ > u1db=3D> alter table public.t1 owner to u1; > ERROR:=C2=A0 relation "public.t1" does not exist > u1db=3D> create table public.t1 (id int); > CREATE TABLE > u1db=3D> \d > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 List of relations > =C2=A0Schema | Name | Type=C2=A0 | Owner > --------+------+-------+------- > =C2=A0public | t1=C2=A0=C2=A0 | table | u1 > (1 row) >=20