Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oalkW-0005rq-7n for pgsql-general@arkaria.postgresql.org; Tue, 20 Sep 2022 22:29:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oalkU-0004Q5-VH for pgsql-general@arkaria.postgresql.org; Tue, 20 Sep 2022 22:29:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oalkU-0004Pw-Kx for pgsql-general@lists.postgresql.org; Tue, 20 Sep 2022 22:29:50 +0000 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oalkQ-0003Nh-CU for pgsql-general@lists.postgresql.org; Tue, 20 Sep 2022 22:29:49 +0000 Received: by mail-qv1-xf31.google.com with SMTP id z9so3147472qvn.9 for ; Tue, 20 Sep 2022 15:29:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date; bh=AFjRkyT33ar8GVg9czOdKCbV7ytgkks/bQ53UNAj0ig=; b=VRgLUHV+B/q7DEdzSektWe/vUl6I2gVHrFZBvmCXFfQ/9tweCnpZ51hVuVUEYrEdWX DCsK3iwV2o6Uvyn1mwccZ/hiUG+aC4qYLi5u0+ProD7PcVN9zKSv6mX6cHsoqVow+deU FyU0ORimJY5rORhnLgaukpz37XTzkXLf4UcpKulv2jE445e745DO4J1hh/2+2iqNYwrx kkE0rbjUFuRfULoD/X6BV4x2C3OpkuEU8EaBqs5Bi2KwDdV7aBm4jxsR2O6NmjcGY2R6 DNefcM94zst37aFMpsWfZl52FfbT6mF7/Ep0UoGRWAGwb3bziLtnGpmSX+75noen7Avx ysXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date; bh=AFjRkyT33ar8GVg9czOdKCbV7ytgkks/bQ53UNAj0ig=; b=CqgpXYhmHhlGk2h6dw6NiHhZHKZXx8h4tJohZNa9j0Qju8LbxzJWZf3qYVwfO9CwEV KcRlf/W7if5pdmu0V5xPh/FOwWjaRfIXoZ/GdwxH2tnvaLUbFAzBPqfN7O/mtmUer7E4 ACvR4rW1JyCXliQZdZwkrzhJrAM2abH0ptCZZ0roOn/gKtY3k51EMcy7nQzFfCOp6n/K 8rZgzPCfTdjwkvVjAj+sE8GkLrIKWDr3+zwACXDvodtgrhSgkVfoZavf28pk0ojbOvmg qGnEy4pim61if+12urSz44FVvZBb89O3XsTl6+4NWvV4TdcV0yD9aierAZzY2XFMKQvh aWGw== X-Gm-Message-State: ACrzQf0PTKOirYy/2oUMOCnLjyTrir2vo/HGBiLfEFjieYRb7YREUgeL ThCfZZDdgrE2vx0V39P+ONDWTfw0QMpKVC2E X-Google-Smtp-Source: AMsMyM7josOZbmvjH6eBkF+By1KyrHp73ORnbns+XYoJ3jl5nKPJmJg3HvpczyTchp1yj9ypT2x1OQ== X-Received: by 2002:a05:6214:194b:b0:4ac:814e:938c with SMTP id q11-20020a056214194b00b004ac814e938cmr20586115qvk.67.1663712985365; Tue, 20 Sep 2022 15:29:45 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-30-4.nwrknj.east.verizon.net. [72.79.30.4]) by smtp.gmail.com with ESMTPSA id s14-20020a05620a29ce00b006ce60f5d8e4sm702799qkp.130.2022.09.20.15.29.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 15:29:44 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------7a2kg3QTVZEsYtGLgrzGaMpT" Message-ID: <3eb8f631-63bc-9b23-7dff-1005f599cce7@gmail.com> Date: Tue, 20 Sep 2022 18:29:44 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: I slipped up so that no existing role allows connection. Is rescue possible? To: pgsql-general@lists.postgresql.org References: <90C875A7-12B9-4667-BE38-17DFB7C44B0C@yugabyte.com> <537913.1663625738@sss.pgh.pa.us> Content-Language: en-US From: Mladen Gogala In-Reply-To: <537913.1663625738@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------7a2kg3QTVZEsYtGLgrzGaMpT Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/19/22 18:15, Tom Lane wrote: > Bryn Llewellyn writes: >> Is rescue possible? Or must I simply remove my cluster and use "pg_ctl" to create a new one within my existing PG 14.5 software env? > Stop the cluster, start a single-user session ("postgres --single"), > re-grant superuser to the postgres user and/or whatever else you > wish you could take back, end that session, restart the cluster. > > (You're not the first to mess up like this.) > > regards, tom lane > > Tom, your knowledge is vast and your advice is extremely useful. Have you ever considered creating a dedicated page for beginners? Something like AskTom.postgresql.org would probably be appropriate. Regards -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com --------------7a2kg3QTVZEsYtGLgrzGaMpT Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 9/19/22 18:15, Tom Lane wrote:
Bryn Llewellyn <bryn@yugabyte.com> writes:
Is rescue possible? Or must I simply remove my cluster and use "pg_ctl" to create a new one within my existing PG 14.5 software env?
Stop the cluster, start a single-user session ("postgres --single"),
re-grant superuser to the postgres user and/or whatever else you
wish you could take back, end that session, restart the cluster.

(You're not the first to mess up like this.)

			regards, tom lane


Tom, your knowledge is vast and your advice is extremely useful. Have you ever considered creating a dedicated page for beginners? Something like AskTom.postgresql.org would probably be appropriate.

Regards

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com
--------------7a2kg3QTVZEsYtGLgrzGaMpT--