Re: Sequence Access Methods, round two

2024-03-18 Thread Michael Paquier
On Thu, Mar 14, 2024 at 09:40:29AM +0900, Michael Paquier wrote: > In the context of this thread, this removes the dependency of sequence > value lookup to heap. I am not sure where this is leading in combination with the sequence stuff for logical decoding, so for now I am moving this patch to th

Re: Sequence Access Methods, round two

2024-03-13 Thread Michael Paquier
On Wed, Mar 13, 2024 at 07:00:37AM +0100, Peter Eisentraut wrote: > I don't understand what the overall benefit of this change is supposed to > be. In the context of this thread, this removes the dependency of sequence value lookup to heap. > If this route were to be pursued, it should be a diffe

Re: Sequence Access Methods, round two

2024-03-12 Thread Peter Eisentraut
On 12.03.24 00:44, Michael Paquier wrote: Anyway, there is one piece of this patch set that I think has a lot of value outside of the discussion with access methods, which is to redesign pg_sequence_last_value so as it returns a (last_value, is_called) tuple rather than a (last_value). This has

Re: Sequence Access Methods, round two

2024-03-11 Thread Michael Paquier
On Tue, Feb 27, 2024 at 10:27:13AM +0900, Michael Paquier wrote: > On Thu, Feb 22, 2024 at 05:36:00PM +0100, Tomas Vondra wrote: >> 0001 >> -- >> >> I think this bit in pg_proc.dat is not quite right: >> >> proallargtypes => '{regclass,bool,int8}', proargmodes => '{i,o,o}', >> proargnames

Re: Sequence Access Methods, round two

2024-02-26 Thread Michael Paquier
On Mon, Feb 26, 2024 at 09:38:06AM +0100, Matthias van de Meent wrote: > On Mon, 26 Feb 2024 at 09:11, Michael Paquier wrote: >> Thanks, I've applied these two for now. I'll reply to the rest >> tomorrow or so. > > Huh, that's surprising to me. I'd expected this to get at least a > final set of

Re: Sequence Access Methods, round two

2024-02-26 Thread Matthias van de Meent
On Mon, 26 Feb 2024 at 09:11, Michael Paquier wrote: > > On Thu, Feb 22, 2024 at 05:36:00PM +0100, Tomas Vondra wrote: > > 0002, 0003 > > > > seems fine, cosmetic changes > > Thanks, I've applied these two for now. I'll reply to the rest > tomorrow or so. Huh, that's surprising to m

Re: Sequence Access Methods, round two

2024-02-26 Thread Michael Paquier
On Thu, Feb 22, 2024 at 05:36:00PM +0100, Tomas Vondra wrote: > 0002, 0003 > > seems fine, cosmetic changes Thanks, I've applied these two for now. I'll reply to the rest tomorrow or so. By the way, I am really wondering if the update of elm->increment in nextval_internal() should b

Re: Sequence Access Methods, round two

2024-02-22 Thread Tomas Vondra
Hi Michael, I took a quick look at this patch series, mostly to understand how it works and how it might interact with the logical decoding patches discussed in a nearby thread. First, some general review comments: 0001 -- I think this bit in pg_proc.dat is not quite right: proallargtype

Re: Sequence Access Methods, round two

2024-02-10 Thread Michael Paquier
On Thu, Feb 08, 2024 at 04:06:36PM +0100, Peter Eisentraut wrote: > On 19.01.24 00:27, Michael Paquier wrote: >> The reason why this stuff has bumped into my desk is that we have no >> good solution in-core for globally-distributed transactions for >> active-active deployments. First, anything we

Re: Sequence Access Methods, round two

2024-02-08 Thread Peter Eisentraut
On 19.01.24 00:27, Michael Paquier wrote: The reason why this stuff has bumped into my desk is that we have no good solution in-core for globally-distributed transactions for active-active deployments. First, anything we have needs to be plugged into default expressions of attributes like with [

Re: Sequence Access Methods, round two

2024-01-24 Thread Michael Paquier
On Tue, Jan 23, 2024 at 10:58:50AM +0100, Peter Eisentraut wrote: > On 18.01.24 16:54, Matthias van de Meent wrote: > The proposed sequence AM patch would support a different nextval function, > but does it support additional parameters? I haven't found that. Yes and no. Yes as in "the patch set

Re: Sequence Access Methods, round two

2024-01-23 Thread Peter Eisentraut
On 18.01.24 16:54, Matthias van de Meent wrote: At $prevjob we had a use case for PRNG to generate small, non-sequential "random" numbers without the birthday problem occurring in sqrt(option space) because that'd increase the printed length of the numbers beyond a set limit. The sequence API pro

Re: Sequence Access Methods, round two

2024-01-21 Thread Peter Smith
2024-01 Commitfest. Hi, This patch has a CF status of "Needs Review" [1], but it seems there were CFbot test failures last time it was run [2]. Please have a look and post an updated version if necessary. == [1] https://commitfest.postgresql.org/46/4677/ [2] https://cirrus-ci.com/task/5576959

Re: Sequence Access Methods, round two

2024-01-18 Thread Michael Paquier
On Thu, Jan 18, 2024 at 04:54:06PM +0100, Matthias van de Meent wrote: > On Thu, 18 Jan 2024, 16:06 Peter Eisentraut, wrote: >> On 01.12.23 06:00, Michael Paquier wrote: >>> Please find attached a patch set that aims at implementing sequence >>> access methods, with callbacks following a model clo

Re: Sequence Access Methods, round two

2024-01-18 Thread Matthias van de Meent
On Thu, 18 Jan 2024, 16:06 Peter Eisentraut, wrote: > > On 01.12.23 06:00, Michael Paquier wrote: > > Please find attached a patch set that aims at implementing sequence > > access methods, with callbacks following a model close to table and > > index AMs, with a few cases in mind: > > - Global se

Re: Sequence Access Methods, round two

2024-01-18 Thread Peter Eisentraut
On 01.12.23 06:00, Michael Paquier wrote: Please find attached a patch set that aims at implementing sequence access methods, with callbacks following a model close to table and index AMs, with a few cases in mind: - Global sequences (including range-allocation, local caching). - Local custom com