Re: Logical Replication Delay on Remote Server

2024-04-23 Thread Ramakrishna m
Hi Team, adding one more point here, 5. Pg_stat_replication_slot total_txn count reduces when lag occurs .Does decoding stop in case of logical replication delay? On Tue, 23 Apr 2024 at 22:55, Ramakrishna m wrote: > Hi Team, > > I am facing replication lag in postgres16 at times,not able

Logical Replication Delay on Remote Server

2024-04-23 Thread Ramakrishna m
Hi Team, I am facing replication lag in postgres16 at times,not able to find the reason. Please find the configuration: 1) Two replication slots for two servers (1 is the same data center, another remote) 2) weekly once/twice facing lag(around 2GB for 1k TPS environment) in the remote

Re: Password forgotten

2024-04-23 Thread hubert depesz lubaczewski
On Tue, Apr 23, 2024 at 08:14:15AM -0400, Arbol One wrote: > Hello. > In my Debian box, after entering this command to psql-16, *psql -h localhost > -U postgres* You might want to read https://www.depesz.com/2008/11/28/recovering-lost-postgresql-password/ Best regards, depesz

Re: Password forgotten

2024-04-23 Thread Tom Lane
"David G. Johnston" writes: > On Tuesday, April 23, 2024, Arbol One wrote: >> psql-16 asks for the password, which I have forgotten. >> Is there a way I can retrieve this master password? > Nope. You need to login using a method that doesn’t require a password > then change the password. See

Re: Password forgotten

2024-04-23 Thread David G. Johnston
On Tuesday, April 23, 2024, Arbol One wrote: > Hello. > In my Debian box, after entering this command to psql-16, *psql -h > localhost -U postgres* > > psql-16 asks for the password, which I have forgotten. > So I get this message: > > > > *psql: error: connection to server at "localhost" (::1),

Re: query multiple schemas

2024-04-23 Thread Marcos Pegoraro
Em dom., 21 de abr. de 2024 às 17:12, Norbert Sándor < sandor.norb...@erinors.com> escreveu: > Hello, > > I have a database with multiple tenants with a separate schema for each > tenant. > The structure of each schema is identical, the tenant ID is the name of > the schema. > > What I would like

Re: Password forgotten

2024-04-23 Thread Hans Schou
Have you tried sudo -u postgres psql On Tue, Apr 23, 2024 at 2:14 PM Arbol One wrote: > Hello. > In my Debian box, after entering this command to psql-16, *psql -h > localhost -U postgres* > > psql-16 asks for the password, which I have forgotten. > So I get this message: > > > > *psql:

Password forgotten

2024-04-23 Thread Arbol One
Hello. In my Debian box, after entering this command to psql-16, *psql -h localhost -U postgres* psql-16 asks for the password, which I have forgotten. So I get this message: *psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL:  password authentication failed for

Re: query multiple schemas

2024-04-23 Thread Dominique Devienne
On Tue, Apr 23, 2024 at 11:08 AM Norbert Sándor wrote: > *> And if/when I get back to this issue myself, I'll do the same.* > My current solution is not much different than the one I posted in my > original question. > > CREATE OR REPLACE FUNCTION tenant_query_json(tbl anyelement) > > RETURNS

Re: query multiple schemas

2024-04-23 Thread Norbert Sándor
> using a dynamic number of schemas Although there are historical reasons behind our "schema per tenant" architecture, it provides very good logical separation of data, and is very convenient that we don't need to include the tenant ID in each query (I'm sure that

Re: query multiple schemas

2024-04-23 Thread Dominique Devienne
On Sun, Apr 21, 2024 at 11:12 PM Tom Lane wrote: > Steve Baldwin writes: > > If the number of tenant schemas is reasonably static, you could write a > > plpgsql function to create a set of UNION ALL views > > Another idea is to build a partitioned table > Hi Norbert. I asked a [similar