Re: Foreign key joins revisited

2021-12-25 Thread Joel Jacobson
On Sat, Dec 25, 2021, at 21:55, Joel Jacobson wrote: > FROM permission p > LEFT JOIN role r WITH p->permission_role_id_fkey = r > LEFT JOIN team_role tr WITH tr->team_role_role_id_fkey = r > LEFT JOIN team t WITH tr->team_role_team_id_fkey = t > LEFT JOIN user_role ur WITH ur->user_

Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

2021-12-25 Thread Dilip Kumar
On Sun, Dec 26, 2021 at 10:36 AM SATYANARAYANA NARLAPURAM < satyanarlapu...@gmail.com> wrote: > >> Actually all the WAL insertions are done under a critical section (except >> few exceptions), that means if you see all the references of XLogInsert(), >> it is always called under the critical secti

Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

2021-12-25 Thread Julien Rouhaud
On Sun, Dec 26, 2021 at 1:06 PM SATYANARAYANA NARLAPURAM wrote: > > Got it, understood the concern. But can we document the limitations of the > hook and let the hook take care of it? I don't expect an error to be thrown > here since we are not planning to allocate memory or make file system cal

Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

2021-12-25 Thread SATYANARAYANA NARLAPURAM
On Sat, Dec 25, 2021 at 6:01 PM Dilip Kumar wrote: > On Sun, Dec 26, 2021 at 3:52 AM SATYANARAYANA NARLAPURAM < > satyanarlapu...@gmail.com> wrote: > >> >> >> On Fri, Dec 24, 2021 at 3:13 AM Dilip Kumar >> wrote: >> >>> On Fri, Dec 24, 2021 at 3:27 AM SATYANARAYANA NARLAPURAM < >>> satyanarlapu.

Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

2021-12-25 Thread Dilip Kumar
On Sun, Dec 26, 2021 at 3:52 AM SATYANARAYANA NARLAPURAM < satyanarlapu...@gmail.com> wrote: > > > On Fri, Dec 24, 2021 at 3:13 AM Dilip Kumar wrote: > >> On Fri, Dec 24, 2021 at 3:27 AM SATYANARAYANA NARLAPURAM < >> satyanarlapu...@gmail.com> wrote: >> >>> >>> XLogInsert in my opinion is th

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-25 Thread Justin Pryzby
On Fri, Dec 24, 2021 at 08:04:08PM +0530, Bharath Rupireddy wrote: > On Fri, Dec 24, 2021 at 7:19 PM Justin Pryzby wrote: > > On Sun, Dec 12, 2021 at 06:08:05PM +0530, Bharath Rupireddy wrote: > > > Another idea could be to use the infrastructure laid out by the commit > > > 9ce346e [1]. With erep

Re: correct the sizes of values and nulls arrays in pg_control_checkpoint

2021-12-25 Thread Justin Pryzby
On Thu, Dec 23, 2021 at 05:09:28PM +0530, Bharath Rupireddy wrote: > Hi, > > pg_control_checkpoint emits 18 columns whereas the values and nulls > arrays are defined to be of size 19. Although it's not critical, > attaching a tiny patch to fix this. LGTM It's helpful to check the history to find

Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

2021-12-25 Thread SATYANARAYANA NARLAPURAM
On Fri, Dec 24, 2021 at 3:13 AM Dilip Kumar wrote: > On Fri, Dec 24, 2021 at 3:27 AM SATYANARAYANA NARLAPURAM < > satyanarlapu...@gmail.com> wrote: > >> >>> >> XLogInsert in my opinion is the best place to call it and the hook can be >> something like this "void xlog_insert_hook(NULL)" as all the

Re: Foreign key joins revisited

2021-12-25 Thread Joel Jacobson
On Sat, Dec 25, 2021, at 22:06, David G. Johnston wrote: > On Saturday, December 25, 2021, Joel Jacobson wrote: > * Would require changes to the SQL standard, i.e. SQL committee work > > Huh? I mean, one could argue this is perhaps even the wrong forum to discuss this idea, since it's a proposed

Re: Foreign key joins revisited

2021-12-25 Thread David G. Johnston
On Saturday, December 25, 2021, Joel Jacobson wrote: > > I've revisited the idea to somehow use foreign keys to do joins, > > -1 > This is somewhat addressed by the USING join form, but USING has other > drawbacks, why I tend to avoid it except for one-off queries. > I find this sufficient.

Foreign key joins revisited

2021-12-25 Thread Joel Jacobson
Hi, I've revisited the idea to somehow use foreign keys to do joins, in the special but common case when joining on columns that exactly match a foreign key. The idea is to add a new ternary operator, which would be allowed only in the FROM clause. It would take three operands: 1) referencing

Re: [PATCH] reduce page overlap of GiST indexes built using sorted method

2021-12-25 Thread Andrey Borodin
Hi Aliaksandr! Thanks for working on this! > Benchmark summary: > > create index roads_rdr_idx on roads_rdr using gist (geom); > > with sort support before patch / CREATE INDEX 76.709 ms > > with sort support after patch / CREATE INDEX 225.238 ms > > without sort support / CREATE INDEX 446.

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-12-25 Thread Joel Jacobson
On Tue, Sep 21, 2021, at 19:55, Tom Lane wrote: > "Joel Jacobson" writes: > > [ 0005-regexp-positions.patch ] > > I took a quick look at this patch. I am on board now with the general > idea of returning match positions, but I think there are still > definitional issues to be discussed. > > 1. Th