Re: Quesion about querying distributed databases

2025-03-05 Thread me nefcanto
I appreciate your time guys. Thank you very much. > Having 1 table per database per server is too ugly. Our databases are not one table per database. They are mapped to DDD's bounded contexts and usually by one table per domain entity. For example, we have these databases: - Contacts - Co

Re: Quesion about querying distributed databases

2025-03-05 Thread Ron Johnson
On Wed, Mar 5, 2025 at 9:44 PM me nefcanto wrote: > I once worked with a monolithic SQL Server database with more than 10 > billion records and about 8 Terabytes of data. A single backup took us more > than 21 days. It was a nightmare. > 25 years ago (meaning *much* slower hardware), I managed a

Re: Quesion about querying distributed databases

2025-03-05 Thread Rob Sargent
> On Mar 5, 2025, at 8:03 PM, Igor Korot jnit worked great for SQL Server. If > you're small, we host them all on one server. If you get bigger, we can put > heavy databases on separate machines. >> >> However, I don't have experience working with other types of database >> scaling. I have us

Re: Quesion about querying distributed databases

2025-03-05 Thread Igor Korot
Hi, On Wed, Mar 5, 2025, 8:44 PM me nefcanto wrote: > I once worked with a monolithic SQL Server database with more than 10 > billion records and about 8 Terabytes of data. A single backup took us more > than 21 days. It was a nightmare. Almost everybody knows that scaling up > has a ceiling, bu

Re: Quesion about querying distributed databases

2025-03-05 Thread me nefcanto
I once worked with a monolithic SQL Server database with more than 10 billion records and about 8 Terabytes of data. A single backup took us more than 21 days. It was a nightmare. Almost everybody knows that scaling up has a ceiling, but scaling out has no boundaries. Therefore I will never choose

Re: Error on query execution

2025-03-05 Thread Igor Korot
Tom, On Tue, Mar 4, 2025, 8:37 PM Tom Lane wrote: > Igor Korot writes: > > binaryIntVal = htonl( (uint32_t) type ); > > paramValues[0] = (char *) &binaryIntVal; > > paramLengths[0] = sizeof( binaryIntVal ); > > paramFormats[0] = 1; > > You're apparently trying to pass this param

Re: Duplicate Key Values

2025-03-05 Thread Adrian Klaver
On 3/5/25 15:37, Ron Johnson wrote: What does "and unique identifier" mean? (Creating a Primary Key constraint automatically creates a unique no-nulls-allowed index on the column(s), so no other index is needed.) Can you show the table definition? Anyway, you /should/ be able to delete one o

Re: Duplicate Key Values

2025-03-05 Thread Ron Johnson
What does "and unique identifier" mean? (Creating a Primary Key constraint automatically creates a unique no-nulls-allowed index on the column(s), so no other index is needed.) Can you show the table definition? Anyway, you *should* be able to delete one of the duplicate node_id records by speci

Re: Duplicate Key Values

2025-03-05 Thread Ron Johnson
On Wed, Mar 5, 2025 at 12:36 PM mark bradley wrote: > Although I did not enter them, somehow duplicate primary key values have > appeared in one of my tables. > Is it a text/varchar column? Has the distro been upgraded "recently", or maybe streamed from an older Linux system to a newer Linux sy

Re: Error on query execution

2025-03-05 Thread Igor Korot
Hi, Tom, On Tue, Mar 4, 2025 at 8:37 PM Tom Lane wrote: > > Igor Korot writes: > > binaryIntVal = htonl( (uint32_t) type ); > > paramValues[0] = (char *) &binaryIntVal; > > paramLengths[0] = sizeof( binaryIntVal ); > > paramFormats[0] = 1; > > You're apparently trying to pass thi

Duplicate Key Values

2025-03-05 Thread mark bradley
Although I did not enter them, somehow duplicate primary key values have appeared in one of my tables. I can't remove the offending rows because the key is a foreign key in another table. What to do? Mark Brady, amazon.com/author/markjbrady

Re: end of COPY

2025-03-05 Thread Marc Millas
Greg... 👍 works fine now. thanks ! Marc MILLAS Senior Architect +33607850334 www.mokadb.com On Wed, Mar 5, 2025 at 4:53 PM Greg Sabino Mullane wrote: > On Wed, Mar 5, 2025 at 10:22 AM Marc Millas > wrote: > >> Then the flow contains a single line: \. to my understanding this means >> end

Re: Quesion about querying distributed databases

2025-03-05 Thread Adrian Klaver
On 3/5/25 04:15, me nefcanto wrote: Dear Laurenz, the point is that I think if we put all databases into one database, then we have blocked our growth in the future. How? A monolith database can be scaled only vertically. We have had huge headaches in the past with SQL Server on Windows and a

Re: end of COPY

2025-03-05 Thread Ron Johnson
On Wed, Mar 5, 2025 at 10:53 AM Greg Sabino Mullane wrote: > On Wed, Mar 5, 2025 at 10:22 AM Marc Millas > wrote: > >> Then the flow contains a single line: \. to my understanding this means >> end of the copy >> >> but, Postgres generates an error : invalid input syntax for type numeric >> "\."

Re: end of COPY

2025-03-05 Thread Adrian Klaver
On 3/5/25 07:22, Marc Millas wrote: Hi, on a Postgres 16 DB running on a redhat 8.5 x86 machineI want to input some data using copy from stdin so.. more that 700 000 lines goes well. Then the flow contains a single line: \. to my understanding this means end of the copy Provide the lines at t

Re: end of COPY

2025-03-05 Thread Greg Sabino Mullane
On Wed, Mar 5, 2025 at 10:22 AM Marc Millas wrote: > Then the flow contains a single line: \. to my understanding this means > end of the copy > > but, Postgres generates an error : invalid input syntax for type numeric > "\." > This can happen when you send TWO backslashes and a dot, rather tha

Re: end of COPY

2025-03-05 Thread Ron Johnson
On Wed, Mar 5, 2025 at 10:22 AM Marc Millas wrote: > Hi, > on a Postgres 16 DB running on a redhat 8.5 x86 machineI want to input > some data using copy from stdin > so.. more that 700 000 lines goes well. > Then the flow contains a single line: \. > to my understanding this means end of the copy

end of COPY

2025-03-05 Thread Marc Millas
Hi, on a Postgres 16 DB running on a redhat 8.5 x86 machineI want to input some data using copy from stdin so.. more that 700 000 lines goes well. Then the flow contains a single line: \. to my understanding this means end of the copy but, Postgres generates an error : invalid input syntax for typ

Re: Quesion about querying distributed databases

2025-03-05 Thread Greg Sabino Mullane
On Wed, Mar 5, 2025 at 7:15 AM me nefcanto wrote: > I think if we put all databases into one database, then we have blocked > our growth in the future. > I think this is premature optimization. Your products table has 100,000 rows. That's very tiny for the year 2025. Try putting everything on on

Re: Quesion about querying distributed databases

2025-03-05 Thread Laurenz Albe
On Wed, 2025-03-05 at 15:45 +0330, me nefcanto wrote: > Dear Laurenz, the point is that I think if we put all databases into one > database, > then we have blocked our growth in the future. Hard to say. If you want to shard for horizontal scaling, that usually only works well if there are few int

Re: Quesion about querying distributed databases

2025-03-05 Thread me nefcanto
Dear Laurenz, the point is that I think if we put all databases into one database, then we have blocked our growth in the future. A monolith database can be scaled only vertically. We have had huge headaches in the past with SQL Server on Windows and a single database. But when you divide bounded c

Re: Quesion about querying distributed databases

2025-03-05 Thread Laurenz Albe
On Wed, 2025-03-05 at 14:18 +0330, me nefcanto wrote: > That means a solid monolith database. We lose many goodies with that. > As a real-world example, right now we can import a single database > from the production to the development to test and troubleshoot data. Well, can't you import a single

Re: Quesion about querying distributed databases

2025-03-05 Thread me nefcanto
Dear Laurenz, That means a solid monolith database. We lose many goodies with that. As a real-world example, right now we can import a single database from the production to the development to test and troubleshoot data. What if we host all databases on the same server and use FDW. What happens i

Re: Quesion about querying distributed databases

2025-03-05 Thread Laurenz Albe
On Wed, 2025-03-05 at 12:57 +0330, me nefcanto wrote: > Right now this data is in MariaDB, on separate databases (schema) but on one > server. The solution in this situation is to have a cross-database query. > (this is the status quo of our application) > > Now our team has decided to migrate to

Virtual patching software for PostgreSQL

2025-03-05 Thread Mike Yeap
Hi all, I'm looking for an alternative software that does virtual patching for PostgreSQL DB servers to the Trellix Database Security (previously named McAfee Database Security) I'm currently using Appreciate if anyone using something like that can share some info Thanks! Regards, Mike Yeap

Re: Quesion about querying distributed databases

2025-03-05 Thread me nefcanto
Laurenz Albe, thanks for your answer. Right now this data is in MariaDB, on separate databases (schema) but on one server. The solution in this situation is to have a cross-database query. (this is the status quo of our application) Now our team has decided to migrate to Postgres. However, we rea