Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread pabloa98
On Sun, Mar 22, 2020 at 6:58 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Sun, Mar 22, 2020 at 5:36 PM Christopher Browne > wrote: > >> >> Then, on any of the tables where you need to assign sequence values, >> you'd need to run an "after" trigger to do the assignment. The func

Postgres cluster setup

2020-03-22 Thread Sonam Sharma
Hello,. Do you have similar setup like Oracle RAC in postgres core . I found in edb but didn't find anything in postgres core. We are looking for setting up replication with no outage and other node will be up , if the primary is down. Any help would be great 😊

Re: Passwordcheck configuration

2020-03-22 Thread Michael Paquier
On Thu, Mar 19, 2020 at 07:19:06PM -0400, Tom Lane wrote: > passwordcheck hasn't got any out-of-the-box configurability. It's mainly > meant as sample code that people could modify if they have a mind to. Here is an example: https://github.com/michaelpq/pg_plugins/tree/master/passwordcheck_extra

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread pabloa98
On Sun, Mar 22, 2020 at 5:36 PM Christopher Browne wrote: > On Sun, 22 Mar 2020 at 17:54, pabloa98 wrote: > >> >> So the question may actually be: >>> >>> How do we improve our locking code, so we don't have to spawn millions >>> of sequences? >>> >>> What is the locking method you are using? >>

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread David G. Johnston
On Sun, Mar 22, 2020 at 5:36 PM Christopher Browne wrote: > > Then, on any of the tables where you need to assign sequence values, you'd > need to run an "after" trigger to do the assignment. The function that > finds the sequence value is kind of analagous: > create or replace function get_next

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Christopher Browne
On Sun, 22 Mar 2020 at 17:54, pabloa98 wrote: > > So the question may actually be: >> >> How do we improve our locking code, so we don't have to spawn millions >> of sequences? >> >> What is the locking method you are using? >> > > I am not using locking with the million sequence solution. I do n

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread pabloa98
> > Now I read this paragraph, I realize I was not clear enough. > > I am saying we do not want to use locks because of all the problems > > described. > > And what I was asking is what locking where you doing? > > And it might be better to ask the list how to solve those problems, then > to create

Re: Duplicate key violation on upsert

2020-03-22 Thread Adrian Klaver
On 3/22/20 2:48 PM, Matt Magoffin wrote: On 23/03/2020, at 9:44 AM, Adrian Klaver > wrote: Is there a chance the BEFORE trigger functions are doing something that could be leading to the error? In the error log is there a line with the actual values that fail

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Adrian Klaver
On 3/22/20 2:53 PM, pabloa98 wrote: So the question may actually be: How do we improve our locking code, so we don't have to spawn millions of sequences? What is the locking method you are using? I am not using locking with the million sequence solution. I do not want someth

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread pabloa98
> So the question may actually be: > > How do we improve our locking code, so we don't have to spawn millions > of sequences? > > What is the locking method you are using? > I am not using locking with the million sequence solution. I do not want something that locks because the problems described

Re: Mixed Locales and Upgrading

2020-03-22 Thread Don Seiler
On Tue, Mar 17, 2020 at 9:25 PM Michael Paquier wrote: > > There is no way to know how much indexes would get broken without > having a look at it. Anything ASCII-based should be of no problem. > If you have a doubt, reindexing evey index which includes text column > data is the best course of a

Re: Duplicate key violation on upsert

2020-03-22 Thread Matt Magoffin
> On 23/03/2020, at 9:44 AM, Adrian Klaver wrote: > Is there a chance the BEFORE trigger functions are doing something that could > be leading to the error? > > In the error log is there a line with the actual values that failed? The error log does not show the literal values, no. Here is a li

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Adrian Klaver
On 3/21/20 11:08 AM, pabloa98 wrote: > As to below that is going to require more thought. > Still no word on the actual requirement. As someone who believes consecutive numbers on digital invoices is simply a mistaken interpretation of the paper based system, I suspect a si

Re: Duplicate key violation on upsert

2020-03-22 Thread Adrian Klaver
On 3/21/20 2:45 PM, Matt Magoffin wrote: On 22/03/2020, at 8:11 AM, Adrian Klaver > wrote: I was thinking more about this: "INSERT INTO solardatum.da_datum(ts, node_id, source_id, posted, jdata_i, jdata_a, jdata_s, jdata_t) VALUES (…) ..." from your OP.

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Peter J. Holzer
On 2020-03-21 13:45:54 -0700, pabloa98 wrote: > On Sat, Mar 21, 2020 at 12:08 PM Peter J. Holzer wrote: > And I think that "care about gaps -> sequence doesn't work" is a > knee-jerk reaction. It's similar to "can't parse HTML with regexps". > True in the general case, and therefore pe

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Peter J. Holzer
On 2020-03-21 14:51:35 -0600, Rob Sargent wrote: > > On Mar 21, 2020, at 1:13 PM, Peter J. Holzer wrote: > > > > On 2020-03-21 12:55:33 -0600, Rob Sargent wrote: > >> To me the description of the ID smacks of database-in-the-name folly. I > >> recognize that OP is likely unable to take another pa