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 1sU9xe-000t5D-A7 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jul 2024 19:05: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 1sU9xc-004Ppl-AY for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jul 2024 19:05:08 +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 1sU9xc-004Ppd-1d for pgsql-hackers@lists.postgresql.org; Wed, 17 Jul 2024 19:05:08 +0000 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sU9xa-0004BF-1A for pgsql-hackers@postgresql.org; Wed, 17 Jul 2024 19:05:07 +0000 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7f684710ff5so39542039f.1 for ; Wed, 17 Jul 2024 12:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721243105; x=1721847905; 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=vUXmWMMiVjzLKsHtvJMCf09O9vsJSnmSUz40Sl9qIBY=; b=m1fPulQlWvGbLj9TxVnZYeqQl4KTSbJBVxXRIcLmnjy13cmhfdGTMj25KJqwajOOBO 8sNh+Cx2PCUj1fKRfMCp9kj3voJJgXJTx2bjRFQaORUFRXJ+8m1dlxP6+3wMk37LYdvy ox0yCCc1y8Vt34XD9U9xasSFfYNTYOAoHk8aUJJKJPXkczZFV5x2U4C2uzcMm77c8CGE VRij0zi1fuWop5vthdd6axuKqwakN1VMGtlYSi+3pcShbBhQnUXfdA1WH/GOVBPHpVpw WcPtPO9Wa2DjpbVopqJbGSrlMQWy/rjFyvxGcjI2aKMQg1Un5Se8xEbWnRCBjWdrERBe i+rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721243105; x=1721847905; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vUXmWMMiVjzLKsHtvJMCf09O9vsJSnmSUz40Sl9qIBY=; b=AK8QQkUw3CKNdebhTR1uI4vwUF8Qo+e3klL+dbhipmebf5G7UErCHL8dOowf5pU0y0 yzoH8KJVWaFJfOjvro4rKaP6gpzVpLc+UTtOyjavaFP3ca9hXdIlVbzUmrUhJcdImhuE vi27XokHwCYdpIH2xI7CLhF4+cPmdGrf344ICScQ6CnP/4t4OmIpg0ezMxRrDIYudc3R 2sioBmP3HklziQlujyfGKqqwCiAG+//NFpbeQMD6oIRPsx4sclBFdOj+3GIO+OKsrdYh tuWZHOs3PZs3jQzQTQOtqsXIRbQkw8zfo5Oet4/MgwwZBEqUmag1VD7Ttfv7yHh9Gwg6 st8A== X-Forwarded-Encrypted: i=1; AJvYcCUspD/yy1+9vmwjFpyYqNDmx+8PUSRlCxz13rUS71bvzDdtIechaz8DiKODkAWLdQs3D9n+OaQ0hJoNWQ5SXhc+28Ebfow7bL9qnShZ X-Gm-Message-State: AOJu0Yy+/rZHSfXX8iMxMFjom+VPtoi8W7r1DwB6XZR36AlD4TTMB2we 4xmjFbNkekrp4lJ6+6qQpUpsyulywnPiYmqXcnm2XHdJ8fDSy3NNw2/98g== X-Google-Smtp-Source: AGHT+IGPAt51uZ3+78nFuaIyPh9BPF1ydzRmWxFJVw2N7C9ykNPuHy89pqNP1Ts8GL71Hsm1RQiH6A== X-Received: by 2002:a05:6e02:158b:b0:376:d20:1470 with SMTP id e9e14a558f8ab-3964f4c26ccmr5157295ab.12.1721243105285; Wed, 17 Jul 2024 12:05:05 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3950c80f609sm9610195ab.64.2024.07.17.12.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jul 2024 12:05:05 -0700 (PDT) Date: Wed, 17 Jul 2024 14:05:03 -0500 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: <0a0f4d52-ab75-4d69-abe8-5713bf70eee6@app.fastmail.com> <3578088.1721242766@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3578088.1721242766@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 17, 2024 at 02:59:26PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> On second thought, I worry that this change might needlessly complicate the >> pg_sequences system view. Maybe we should just add a >> pg_sequence_get_tuple() function that returns everything in >> FormData_pg_sequence_data for a given sequence OID... > > Uh ... why do we need a function, rather than just > > select * from pg_sequence We can use that for dumpSequence(), but dumpSequenceData() requires information from the sequence tuple itself. Right now, we query each sequence relation individually for that data, and I'm trying to find a way to cut down on those round trips. -- nathan