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 1sTvG8-003kZT-52 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jul 2024 03:23:16 +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 1sTvG6-00600t-GK for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jul 2024 03:23:14 +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 1sTvG6-00600k-6N for pgsql-hackers@lists.postgresql.org; Wed, 17 Jul 2024 03:23:14 +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 1sTvG2-002RNZ-L6 for pgsql-hackers@postgresql.org; Wed, 17 Jul 2024 03:23:12 +0000 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-8036ce660e5so23428339f.1 for ; Tue, 16 Jul 2024 20:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721186590; x=1721791390; 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=TLJfh5OY9VCGJWjd0AEOhsFSCP/mG+7gkRJWMYyR0B8=; b=JPXHfWqyztkZN8sLPHijmNf4JJlIW4ctSs8BBOP9u/P3/bADrCM9kUe3SvUX8et5vi at+H6wuXz6ZpxUctmCWUrNXWTPQeXxBG5OwyhbjiJWxgIwqVnw0xMzdOgEFo3lLGoScD xjncyQ+PJfDxT6st9ygvSNNsz99GMHa3VpJyNaIwK+K3sqbR2tdro+9gMDsGWll0UbKh afjrfVmo4aewHQdbmI0CIKajjukmvCzS787Pa0uFbSL0Vg/2mKe3Oxh2bCpRhWKf4Z00 dnQ2Ewtw2OVGz9AsjUXsdx4On4dzxHkAbIdYbYRSoKAcZ3qM2TWOABS+sy2Ld2Pj1j2I k5Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721186590; x=1721791390; 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=TLJfh5OY9VCGJWjd0AEOhsFSCP/mG+7gkRJWMYyR0B8=; b=D1Bk2CHWY4sVVC3MyuVBdAOaI497Wiba5jYZei/xzfLOuRkcotdWk1O0gi7duJZoBU 0B7EsDYP+fadjQxgkc3JpyA6gpS9XxZwq2N47vN757iLJvUFdJXezEIQb9qtJ37t2Nfk iz9lY9b2cF5Xth+uEUjwwSv/gYQ20sx5mlXqqyJQ9DfYoRCVbbCPNBsRt+EfFQlU5TWS 9RyojftqgXlSmsFxJQmczgdy9PmqeCnjJdrwYWTZtH1YVR/bcZUCOgeED5RYXnl5xw/y tJyirZ7qk33tdQoYi41dlAryF/uP5HViQWWcPz54zgvE924/ImUrO1ucEZtd17ZED9UC 6Mow== X-Forwarded-Encrypted: i=1; AJvYcCWNv9CCPeCGcwiSG5rDU6Q68p+OjHc6mQmFJJNSK5PKacpHoDiuZBCmkSMLh9IvNwQREmkykAhKe3m8iL9JsB1dyGd/0vFu0c4fNn0R X-Gm-Message-State: AOJu0YzMnHybFugK4RWRCICSQXYMYU3ihzeQU4pAUox6YFzwQ4ZlhM5Y JZSMZ7PwwHBl3vllkBt6tEe7+TM1wOvYV1o8ytt/fhoyyi1gEMFk X-Google-Smtp-Source: AGHT+IGOOWPOo2vlduOYY43MLlQr32todo3jbt/6COyGoVuTvodK4dftK4ch6OZkOwCSoz0SeCB0+g== X-Received: by 2002:a05:6602:27c8:b0:7f6:1cb2:8027 with SMTP id ca18e2360f4ac-817125e1bd0mr80828439f.17.1721186589789; Tue, 16 Jul 2024 20:23:09 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-816c12f57e7sm33746539f.6.2024.07.16.20.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 20:23:09 -0700 (PDT) Date: Tue, 16 Jul 2024 22:23:08 -0500 From: Nathan Bossart To: Michael Paquier Cc: Euler Taveira , pgsql-hackers Subject: Re: improve performance of pg_dump with many sequences Message-ID: References: <20240503025140.GA1227404@nathanxps13> <0a0f4d52-ab75-4d69-abe8-5713bf70eee6@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 17, 2024 at 11:30:04AM +0900, Michael Paquier wrote: > Yeah, I have bumped on the same issue. In the long term, I also think > that we'd better have pg_sequence_last_value() return a row with > is_called and the value scanned. As you say, it won't help except > when upgrading from versions of Postgres that are at least to v18, > assuming that this change gets in the tree, but that would be much > better in the long term and time flies fast. AFAICT pg_sequence_last_value() is basically an undocumented internal function only really intended for use by the pg_sequences system view, so changing the function like this for v18 might not be out of the question. Otherwise, I think we'd have to create a strikingly similar function with slightly different behavior, which would be a bizarre place to end up. -- nathan