Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jFRVA-0006x0-Ld for pgsql-general@arkaria.postgresql.org; Fri, 20 Mar 2020 23:56:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jFRV8-0002vE-5S for pgsql-general@arkaria.postgresql.org; Fri, 20 Mar 2020 23:56:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jFRV7-0002v7-Pq for pgsql-general@lists.postgresql.org; Fri, 20 Mar 2020 23:56:29 +0000 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jFRV4-0008Tv-NX for pgsql-general@lists.postgresql.org; Fri, 20 Mar 2020 23:56:29 +0000 Received: by mail-il1-x131.google.com with SMTP id e8so7350213ilc.13 for ; Fri, 20 Mar 2020 16:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=BTkhdzXzAPCR6uHypFukaGjYijarL48MOxJWdD6t8Tk=; b=pNK/4ATmYj1X8qLkow/dR/YKKKD34DI8N/7FsbzVlu2sN8svkjxjFfr8F+AtL0Jh3W 9ew6JAq/zQZLBMDnx64O3s3ZVoPI390RZlJsOgfa7majxzgDTNZ5e2BhmA6j6+bH13FC hxN3fUB1xNJZe+eeI1D42P6ThWKvGgeXuNvmLdQwIPtns4L3V+5OpNcnk1qlvfBPU4Z5 Soq5fzxpU5jHpyDGi4AGKzArOnyotnkJg4cRc8Lhi8tGVbGHuxTRdOu9GLBmEsjc688k bJGRaoJiGPbkMlSJLzs/LhoHPRa4+g+CEFpVT1d+lH04VRhCxHqCCFmdalTPhuZ8PbIQ 2y3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=BTkhdzXzAPCR6uHypFukaGjYijarL48MOxJWdD6t8Tk=; b=IAraGZ4Iom/AdFa/v9577YkwFBbgtRpLQhT5jOY/MUwxucvH43lh9lB0wfYSPxohBu 9dhb2EGME1u8mpoCstab9tjiK0T7nY7h7y5a7beIDEnUPTHy1GAWCsVCojIo5IRqBwb3 VlXnxq6Q77dqS4QpqHAfo5ORaTVqSm9g6X27Bvsn4wrBxRreUABRmZVsk6Ak23IjbrpC ASIHT7k6x39T3BjEEmtbSx4yW73Flruaoy5JgYpkC4F08xQyvGSHDcMDESdgvgSiDS/F PXrb8VR4378ZdqJut+nSLsPnhkb+mUnZ+tc9YrXJjBBaw2PwkhgNggzNRR3KF8yWgQTw MWwQ== X-Gm-Message-State: ANhLgQ1KCeg1ytVsweaGspGh2hM0ZARLoxbCWTTHV4T1Fdn/uCOjSfmQ dqhEFo+dYvFdBrM+jwDVw66aLOBk X-Google-Smtp-Source: ADFU+vua533iHQJtlAHXUpoHOqoBIlVh5ZrHV4OGMm0B6TtDzXQ9ZykahE+51p4r4iUCirKVJVK6/A== X-Received: by 2002:a92:4896:: with SMTP id j22mr6259466ilg.158.1584748584488; Fri, 20 Mar 2020 16:56:24 -0700 (PDT) Received: from [192.168.1.144] (c-73-63-59-118.hsd1.ut.comcast.net. [73.63.59.118]) by smtp.gmail.com with ESMTPSA id t24sm2503454ill.63.2020.03.20.16.56.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Mar 2020 16:56:24 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Rob Sargent Mime-Version: 1.0 (1.0) Subject: Re: Could postgres12 support millions of sequences? (like 10 million) Date: Fri, 20 Mar 2020 17:56:23 -0600 Message-Id: <796417DB-2DCB-4667-99B5-A8919358792E@gmail.com> References: <20200320232929.GA22868@hjp.at> Cc: pgsql-general@lists.postgresql.org In-Reply-To: <20200320232929.GA22868@hjp.at> To: "Peter J. Holzer" X-Mailer: iPhone Mail (17D50) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Mar 20, 2020, at 5:29 PM, Peter J. Holzer wrote: >=20 > =EF=BB=BF >>=20 >>=20 >> OP has said small gaps are ok. >=20 > Yes. This wasn't a response to the OP's requirements, but to David's > (rather knee-jerk, IMHO) "don't use sequences" response. Very often the > requirements which would preclude sequences also preclude any other > solution. >=20 > (In the case of the OP's problem, I'd agree that sequences are probably > a bad idea for the reasons he anticipates) >=20 >> To me that says the requirement >=20 > Which requirement? The OP's or the one I posed here? >=20 >> is capricious but we haven=E2=80=99t heard the rationale for the requirem= ent >> yet (or I missed it) >=20 > The OP gave a rationale: He has to fit the counter into an 8-digit > field, and a global counter would overflow that. So he needs per-element > counters. >=20 > hp Isn=E2=80=99t that the implementation of a req along the lines of =E2=80=9Cw= e want to number the occurrences of these pairs because ...=E2=80=9D? >=20 > --=20 > _ | Peter J. Holzer | Story must make more sense than reality. > |_|_) | | > | | | hjp@hjp.at | -- Charles Stross, "Creative writing > __/ | http://www.hjp.at/ | challenge!"