Re: Increase limit on max length of the password( pg versions < 14)

2023-07-18 Thread mahendrakar s
Access token length with bare minimal claims is more than 1000 in this case. Workarounds are not possible in production. On Tue, 18 Jul 2023 at 15:10, Daniel Gustafsson wrote: > > > On 18 Jul 2023, at 11:30, mahendrakar s wrote: > > > So we have two options: > > 1. Backp

Increase limit on max length of the password( pg versions < 14)

2023-07-18 Thread mahendrakar s
Hi hackers, We have encountered an issue (invalid message length) when the password length is > 1000 in pg 11,12,13 versions. This is due to the limit(1000) on the max length of the password. In this case the password is an access token(JWT) which can have varied lengths > 1000. I see that this

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-01-24 Thread mahendrakar s
Hi All, The "issuer" field has been removed to align with the RFC implementation - https://www.rfc-editor.org/rfc/rfc7628. This patch "v6" is a single patch to support the OAUTH BEARER token through psql connection string. Below flow is supported. Added the documentation in the commit messages.

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-01-12 Thread mahendrakar s
Hi All, Changes added to Jacob's patch(v2) as per the discussion in the thread. The changes allow the customer to send the OAUTH BEARER token through psql connection string. Example: psql -U u...@example.com -d 'dbname=postgres oauth_bearer_token=abc' To configure OAUTH, the pg_hba.conf line

Re: [PoC] Federated Authn/z with OAUTHBEARER

2022-11-24 Thread mahendrakar s
don't think it's much of a departure, but rather a separation of > responsibilities between libpq and upstream clients. > As libpq can be used in different apps, the client would need > different types of flows/grants. > I.e. those need to be provided to libpq at connection initialization

Re: [PoC] Federated Authn/z with OAUTHBEARER

2022-11-23 Thread mahendrakar s
Hi, We validated on  libpq handling OAuth natively with different flows with different OIDC certified providers. Flows: Device Code, Client Credentials and Refresh Token. Providers: Microsoft, Google and Okta. Also validated with OAuth provider Github. We propose using OpenID Connect (OIDC) as

Re: [PoC] Federated Authn/z with OAUTHBEARER

2022-09-19 Thread mahendrakar s
Hi Hackers, We are trying to implement AAD(Azure AD) support in PostgreSQL and it can be achieved with support of the OAuth method. To support AAD on top of OAuth in a generic fashion (i.e for all other OAuth providers), we are proposing this patch. It basically exposes two new hooks (one for

Re: Stack overflow issue

2022-08-24 Thread mahendrakar s
Alvaro Herrera >> wrote: >> >>> On 2022-Aug-24, mahendrakar s wrote: >>> >>> > Hi, >>> > Can we have a parameter to control the recursion depth in these cases >>> to >>> > avoid crashes? >>> >>> We already have

Re: Stack overflow issue

2022-08-24 Thread mahendrakar s
Thanks. On Wed, 24 Aug, 2022, 4:19 pm Alvaro Herrera, wrote: > On 2022-Aug-24, mahendrakar s wrote: > > > Hi, > > Can we have a parameter to control the recursion depth in these cases to > > avoid crashes? > > We already have one (max_stack_depth). The problem is

Re: Stack overflow issue

2022-08-24 Thread mahendrakar s
Hi, Can we have a parameter to control the recursion depth in these cases to avoid crashes? Just a thought. Thanks, Mahendrakar. On Wed, 24 Aug, 2022, 3:21 pm Егор Чиндяскин, wrote: > Hello, I recently got a server crash (bug #17583 [1]) caused by a stack > overflow. > > Tom Lane and Richard

Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

2022-08-19 Thread mahendrakar s
Changes look good to me. Thanks, Mahendrakar. On Fri, 19 Aug 2022 at 17:28, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Fri, Aug 19, 2022 at 1:37 PM mahendrakar s > wrote: > > > > Hi Bharath, > > I reviewed your patch. Minor comments. &

Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

2022-08-19 Thread mahendrakar s
9 AM Bharath Rupireddy > wrote: > > > > On Sun, Jul 31, 2022 at 8:36 PM mahendrakar s > > wrote: > > > > > >> On Mon, 25 Jul 2022 at 16:42, Bharath Rupireddy < > bharath.rupireddyforpostg...@gmail.com> wrote: > > >> Here's the v3 patch after

Re: [PATCH] Add a inline function to eliminate duplicate code

2022-08-02 Thread mahendrakar s
Patch is looking good to me. Thanks, Mahendrakar. On Tue, 2 Aug 2022 at 16:57, Junwang Zhao wrote: > abstract the logic of `scankey change attribute num to index col > number` to change_sk_attno_to_index_column_num, which is a static > inline function. > > -- > Regards > Junwang Zhao >

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-02 Thread mahendrakar s
Hi Ranier, I'm pretty late to thread but would like to know about your claim in the thread: `All compilers currently have memset optimized.` I know one case of optimization where variable is not used after the memset. Are the cases for which the optimization is done consistent across all the

Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

2022-07-31 Thread mahendrakar s
Hi Bharath, Idea to atomically allocate WAL file by creating tmp file and renaming it is nice. I have one question though: How is partially temp file created will be cleaned if the VM crashes or out of disk space cases? Does it endup creating multiple files for every VM crash/disk space during

Re: A proposal for shared memory based backup infrastructure

2022-07-30 Thread mahendrakar s
10:03 AM mahendrakar s > wrote: > > > > Hi Bharath, > > Thanks Mahendrakar for taking a look at the design. > > > "Typically, step (3) takes a good amount of time in production > > environments with terabytes or petabytes scale of data and keeping the > > sessi

Re: A proposal for shared memory based backup infrastructure

2022-07-24 Thread mahendrakar s
Hi Bharath, *"Typically, step (3) takes a good amount of time in productionenvironments with terabytes or petabytes scale of data and keeping thesession alive from step (1) to (4) has overhead and it wastes theresources. And the session can get closed for various reasons - idlein session

Re: Enforce "max_wal_size/ min_wal_size must be at least twice wal_segment_size" limit while setting GUCs

2022-05-21 Thread mahendrakar s
Hi Bharath, +1. This seems to be good idea to have checks on upper bound for the max_wal_size and min_wal_size. We have seen customers play with these parameters and ran into issues. It will also be better to consider all the control parameters and have a min/max checks on them as well. Thanks,