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.96) (envelope-from ) id 1vdcwE-002vP0-1p for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 23:27:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdcwD-00GE5L-0u for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 23:27:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdcwC-00GE5D-3A for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 23:27:37 +0000 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vdcwB-005ART-1P for pgsql-hackers@postgresql.org; Wed, 07 Jan 2026 23:27:37 +0000 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-7c7aee74dceso1094120a34.2 for ; Wed, 07 Jan 2026 15:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767828454; x=1768433254; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RXJtGQQz2QWMXSWp9sTNxMw7uilu/asw2H3qK3Fho1c=; b=WfcBS3DtAGkh9FcCinanM/9jzmk6NdxUmpwprfGXyHxCBwebVuJJ5OZwHqH0bTbXDG YSUjJKAIuDqOml9Gn/G68zj/C0qvXqGcwimUWlzroUwpwIE5H4wDSlWbAH/W0vlbt+RX brnHfN3rcI7zoZLY0/45xnssL7WwP5WI1Rw2LBZoEBFEy8waU8lLzfYTRxzaBzg/bRsu cTKSWBm5a+Q9PVy7Pt6R3AnYLi6m8p4RIldHzJPqIz7Ee0gr1YXM+DBwX4ukH7z3fbKg 0OJ9vLAw1xkZVsLY+ZPk3fngRM7Yh966YhWluZktqK1S3okn586rPbqvDCgerJavkg9s n2Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767828454; x=1768433254; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RXJtGQQz2QWMXSWp9sTNxMw7uilu/asw2H3qK3Fho1c=; b=d6thzQ4+0IUj6aXQYxehGf466stTXItiFTW7eTShB38uqTylIVIcm/sUwMFYd/OlW7 C/x8TmtSZjFYwcclkoAlDfxTusc9T2i3175AuLw9A4HObfYQkdLGe/o6Ylh4Zs3LYqxn RJP15bRTRhSyqIU9msTboH+Cze62x1zGVVsXsEr080nMP+YvWEQA36jDget4EWwVNlZA KDvlMRw6HZjRcWNSjMCLIjiF+9zb9EQEiLbdwrve6sM5Ao1Ou1ZVyRfCq0TEswUKVxXQ 0+kbGRhqtpYclLN5iOzd5Z5KzjknLVjaQjZrSkAIcnMhy2zmAQY+8zFgYpMU+povT2AR QPiA== X-Forwarded-Encrypted: i=1; AJvYcCUv0dd7sX+K84hHFKZZG57Qb8Coc6Roj2KhLtOGLFKuUgRhZE9sGoLqVWTw/5OpXQ46P8gr97dip6LAvDOY@postgresql.org X-Gm-Message-State: AOJu0Yw3MssHotYM9Ufs8aVI0tUh44Y8vioQQZH8zjqRagmUgp3G7TIi AuS9yDuQXA3wUpYswnvmD4IyJwn9i7BG9cO/aryUppGG3nHtTNawtpxA6Va5BAUT X-Gm-Gg: AY/fxX6saKd1lkPTX2kxwrfpwTcEp6UK7x2vgvoS5yK9FIwY5S6fwi2AoS67oUk7thI KGsq/SwSMgqSFiBtkJd2mt4qhx8odREDtlGuqD2tSied5BDAdDmPrKLy2kBAT7JsZ9ZPTipCsil AuKjhEcU/JHoaRr4eeByM/2uqnGsP9t1uLhln/Mvudog5O7FnEYBcz8YuzoZAM4/PQR+IwTh1Dk b+KdjkfA3KHRndbbDWTz8SLkYixYIcwKmAQjUyYOHPUb5mamohcrjqz/KQBz4Z+MyylH6OHNaS/ 8n/KU5sQG+iMMTj6Z5ayx+48Wwio3QriIbRFiEFvwNnjYxi3nH2BDOMpOXG3W9YWct6vbjG6+ey wznow4F9UwFYEBzyfBF2J/lo1jSEftNYrxGg+p5vmkpWzsfT45KS0qwpgnWFQDrfZ/8H1gOhgNo Q1Ikb9fkjv3f90Px1dapUksJ7u9LO1cFZCShj2 X-Google-Smtp-Source: AGHT+IGT+qXnfUZoNzK1E4iqxBKNHC3ZjlJW7NXs0kvMUoDHrmvyQYHp1qBko+0GHZPaVdH5fbOh5g== X-Received: by 2002:a05:6830:4c08:b0:7c7:5907:b1a8 with SMTP id 46e09a7af769-7ce508d5f08mr2551668a34.13.1767828453740; Wed, 07 Jan 2026 15:27:33 -0800 (PST) Received: from nathan ([2600:382:6a25:b834:209a:e064:8971:38e3]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7ce47801d58sm4392974a34.2.2026.01.07.15.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jan 2026 15:27:33 -0800 (PST) Date: Wed, 7 Jan 2026 17:27:31 -0600 From: Nathan Bossart To: Tom Lane Cc: Michael Paquier , Euler Taveira , pgsql-hackers Subject: Re: improve performance of pg_dump with many sequences Message-ID: References: <3585715.1721243507@sss.pgh.pa.us> <3640163.1721275101@sss.pgh.pa.us> <2885944.1767029161@sss.pgh.pa.us> <1862355.1767827628@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1862355.1767827628@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 07, 2026 at 06:13:48PM -0500, Tom Lane wrote: > Nathan Bossart writes: >> Before v18, pg_dump just ERRORs due to insufficient privileges on a >> sequence. IMHO that makes sense. If you ask pg_dump to dump something you >> don't have privileges on, I'd expect it to error instead of silently >> skipping it. > > That would be a fine argument were it not that collectSequences() > tries to vacuum up the data for every sequence in the DB, whether > the user has asked to dump them all or not. In other places in > pg_dump, we avoid such problems by restricting which tables we > ask for data about ... but not here. I meant that we could teach pg_dump to error in dumpSequenceData() if it sees nulls for the sequence in question. -- nathan