Re: initdb can't init the database

2023-06-09 Thread Ian Lawrence Barwick
2023年6月10日(土) 14:30 Wen Yi <896634...@qq.com>: > > Hi team, > I use the source to install the postgresql 15.3 (Fedora Linux 37), I create a > install.sh as this: > > install.sh: > > sudo rm -r /home/postgres/pgsql > sudo mkdir /home/postgres/pgsql > sudo rm -r /home/postgres/pgsql/lib > sudo

initdb can't init the database

2023-06-09 Thread Wen Yi
Hi team, I use the source to install the postgresql 15.3 (Fedora Linux 37), I create a install.sh as this: install.sh: sudo rm -r /home/postgres/pgsql sudo mkdir /home/postgres/pgsql sudo rm -r /home/postgres/pgsql/lib sudo mkdir /home/postgres/pgsql/lib ./configure

Re: Active Active PostgreSQL Solution

2023-06-09 Thread Marcos Pegoraro
Em sex., 9 de jun. de 2023 às 22:22, Bruce Momjian > > Uh, I have no idea what that means and I didn't think we had active-active > in version 16 https://postgrespro.com/blog/pgsql/5969859#commit_36628396 Regards Marcos -- Atenciosamente,

Re: Active Active PostgreSQL Solution

2023-06-09 Thread Bruce Momjian
On Fri, Jun 9, 2023 at 10:01:48AM -0300, Marcos Pegoraro wrote: > Postgres 16 will have origin on logical replication, so you can have Active > Active mode. Uh, I have no idea what that means and I didn't think we had active-active in PG 16. -- Bruce Momjian https://momjian.us EDB

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Michael Nolan
You're gonna lock yourself into SOMETHING, that's why there are still thousands of COBOL programs still being maintained. Mike Nolan On Fri, Jun 9, 2023 at 3:39 PM Ron wrote: > > You can be sure that banks and academic research projects have different > needs. Heck, your University's class

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Adrian Klaver
On 6/9/23 11:36, Nim Li wrote: Hello, Thank you so so much for all the feedback so far.  :D About this comment: > "... an application that requires changing the data model does not seem to be well designed...don't allow model change by the business logic..." I work in a science research

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Guyren Howe
People change applications and programming languages all the time. But change the database? Particularly away from Postgres, which is for nearly any purpose clearly the best SQL database available? You have to pick one. Heck, write your triggers and stored procedures in Python and you can

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Ron
You can be sure that banks and academic research projects have different needs.  Heck, your University's class scheduling software has different needs from the research problems that you support. The bottom line is that putting all of the "business" logic in TypeORM *locks you into* using an

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Nim Li
Hello, Thank you so so much for all the feedback so far. :D About this comment: > "... an application that requires changing the data model does not seem to be well designed...don't allow model change by the business logic..." I work in a science research faculity. When researchers start a

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Lorusso Domenico
Uhm me need to start form 2 concepts: 1. competence 2. Network lag Competence: usually programmers aren't skilled enough about the architectures and the actual needs of each layer. This is a problem, because often programmers try to do something with what he already know (e.g. perform join

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Michael Nolan
Clearly I'm a 73 year old dinosaur, because I believe in having the business logic in the database wherever possible. But the development projects I've been around lately aren't using triggers at all. (And it should not surprise anyone, certainly not me, that consistency of data enforcement is

Re: Question about where to deploy the business logics for data processing

2023-06-09 Thread Rob Sargent
> On Jun 8, 2023, at 8:21 PM, Nim Li wrote: > > Hello. > > We have a PostgreSQL database with many tables, as well as foreign table, > dblink, triggers, functions, indexes, etc, for managing the business logics > of the data within the database. We also have a custom table for the purpose

Re: How To: A large [2D] matrix, 100,000+ rows/columns

2023-06-09 Thread Erik Wienhold
> On 09/06/2023 16:00 CEST Wim Bertels wrote: > > Joe Conway schreef op vr 09-06-2023 om 09:16 [-0400]: > > On 6/8/23 22:17, Pat Trainor wrote: > > > I need to have a very large matrix to maintain & query, and if not > > > (1,600 column limit), then how could such data be broken down to > > >

Re: How To: A large [2D] matrix, 100,000+ rows/columns

2023-06-09 Thread Wim Bertels
Joe Conway schreef op vr 09-06-2023 om 09:16 [-0400]: > On 6/8/23 22:17, Pat Trainor wrote: > > I need to have a very large matrix to maintain & query, and if not > > (1,600 column limit), then how could such data be broken down to > > work? > >   100,000 rows * >   100,000 columns * >   8 bytes

Re: How To: A large [2D] matrix, 100,000+ rows/columns

2023-06-09 Thread Joe Conway
On 6/8/23 22:17, Pat Trainor wrote: Imagine something akin to stocks, where you have a row for every stock, and a column for every stock. Except where the same stock is the row & col, a number is at each X-Y (row/column), and that is the big picture. I need to have a very large matrix to

Re: Active Active PostgreSQL Solution

2023-06-09 Thread Ben Chobot
Mohsin Kazmi wrote on 6/9/23 3:38 AM: Now in order to deploy PostgreSQL in our production servers, I need to configure it in Active Active mode. Can anyone help me to do so? We don't need multi-master postgres very often, but when we do, we find the open source bucardo project works fairly

Re: Active Active PostgreSQL Solution

2023-06-09 Thread Marcos Pegoraro
Postgres 16 will have origin on logical replication, so you can have Active Active mode. regards, Marcos Em sex., 9 de jun. de 2023 às 07:41, Mohsin Kazmi escreveu: > Hello Everyone, > > I have been working on PostgreSQL databases for the last three years and I > have also migrate databases

Re: Active Active PostgreSQL Solution

2023-06-09 Thread Andreas Kretschmer
On 9 June 2023 12:38:40 CEST, Mohsin Kazmi wrote: >Hello Everyone, > >I have been working on PostgreSQL databases for the last three years and I >have also migrate databases from Oracle to PostgreSQL as well. I configured >PostgreSQL for logical replication as well. > >Now in order to deploy

Re: How to store query result into another table using stored procedure

2023-06-09 Thread Erik Wienhold
> On 09/06/2023 07:51 CEST Rama Krishnan wrote: > > CREATE or REPLACE PROCEDURE deleted_cards_count_test(start_date TIMESTAMP, > end_date TIMESTAMP) AS $$ > DECLARE > current_date TIMESTAMP; > month_start_date TIMESTAMP; > month_end_date TIMESTAMP; > month24_end_date TIMESTAMP; >

Active Active PostgreSQL Solution

2023-06-09 Thread Mohsin Kazmi
Hello Everyone, I have been working on PostgreSQL databases for the last three years and I have also migrate databases from Oracle to PostgreSQL as well. I configured PostgreSQL for logical replication as well. Now in order to deploy PostgreSQL in our production servers, I need to configure it

Re: How to securely isolate databases/users in a multi-tenant Postgresql?

2023-06-09 Thread Erik Wienhold
> On 09/06/2023 08:54 CEST Alex Lee wrote: > > I want to make a service that gives each of my users their own PG user and > database. I want to keep them isolated from each other. There are no special > extensions installed, it's a pretty vanilla PG cluster. > > Are there any considerations

Why lex & yacc think this is a syntax error?

2023-06-09 Thread Wen Yi
Hi team, I am learning the yacc lex and want to use it to make a config parser, as you can see, the config file is following these rules: key = value For example: memory_limit = 512 memory_unit = 'MB' time_limit = 12 time_unit = 's' And I make such a yacc lex rule file: /* config.y

Logical replication slots stuck in catchup on a very large table

2023-06-09 Thread Mathieu Poussin
Hello everyone. I am working on a database migration from old post PostgreSQL 10 hosted in a Stolon in Kubernetes (yes I know, it's looking for troubles) to a managed AWS RDS Postgresql 15 database. The only potential solution I found to do this migration is to use the logical replication, as

Re: How to store query result into another table using stored procedure

2023-06-09 Thread Ron
On 6/9/23 00:51, Rama Krishnan wrote: Hi All, I have a table like below Create table if not exists digi_card(      Digi_card_id varchar(100),     created_date timestamp,     updated_date timestamp,      status varchar(50),      reason varchar(50) ); Sample values: Insert into digi_card

How to securely isolate databases/users in a multi-tenant Postgresql?

2023-06-09 Thread Alex Lee
I want to make a service that gives each of my users their own PG user and database. I want to keep them isolated from each other. There are no special extensions installed, it's a pretty vanilla PG cluster. Are there any considerations beyond making each person their own user and owner of their

How to store query result into another table using stored procedure

2023-06-09 Thread Rama Krishnan
Hi All, I have a table like below Create table if not exists digi_card( Digi_card_id varchar(100), created_date timestamp, updated_date timestamp, status varchar(50), reason varchar(50) ); Sample values: Insert into digi_card values ('ee4422', '2019-03-01 00:25:00',

Re: How To: A large [2D] matrix, 100,000+ rows/columns

2023-06-09 Thread Alban Hertroys
> On 9 Jun 2023, at 04:17, Pat Trainor wrote: (…) > Imagine something akin to stocks, where you have a row for every stock, and a > column for every stock. Except where the same stock is the row & col, a > number is at each X-Y (row/column), and that is the big picture. I need to > have a