Re: load fom csv

2024-09-16 Thread Muhammad Usman Khan
Hi, Try the following options: - Check if psql is working independently: psql -h $pgServer -d $pgDatabase -U $pgUser -c "SELECT 1;" - Check for permission issues on the CSV file - Run the command manually without variables psql -h your_host -d your_db -U your_user -c "\COPY your_ta

Re: update faster way

2024-09-16 Thread Muhammad Usman Khan
Hi, You can solve this problem using Citus in PostgreSQL, which is specifically designed for parallelism SELECT create_distributed_table('tab_part1', 'partition_key'); SELECT create_distributed_table('reference_tab', 'reference_key'); UPDATE tab_part1 SET column1 = reftab.code FROM reference_tab

Re: IO related waits

2024-09-16 Thread veem v
On Tue, 17 Sept 2024 at 03:41, Adrian Klaver wrote: > > Are you referring to this?: > > > https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/dev/datastream/operators/asyncio/ > > If not then you will need to be more specific. > > Yes, I was referring to this one. So what can be the c

Re: IO related waits

2024-09-16 Thread Adrian Klaver
On 9/16/24 13:24, veem v wrote: Hi, One of our application using RDS postgres. In one of our streaming applications(using flink) which processes 100's of millions of transactions each day, we are using row by row transaction processing for inserting data into the postgres database and commit i

Re: IO related waits

2024-09-16 Thread Christophe Pettus
> On Sep 16, 2024, at 13:24, veem v wrote: > Architecture team is suggesting to enable asynch io if possible, so that the > streaming client will not wait for the commit confirmation from the database. > So I want to understand , how asynch io can be enabled and if any downsides > of doing t

IO related waits

2024-09-16 Thread veem v
Hi, One of our application using RDS postgres. In one of our streaming applications(using flink) which processes 100's of millions of transactions each day, we are using row by row transaction processing for inserting data into the postgres database and commit is performed for each row. We are seei

Re: load fom csv

2024-09-16 Thread Adrian Klaver
On 9/16/24 10:00, Andy Hartman wrote: in LOG 2024-09-16 12:55:37.295 EDT [428] ERROR:  invalid byte sequence for encoding "UTF8": 0x00 2024-09-16 12:55:37.295 EDT [428] CONTEXT:  COPY image_classification_master, line 1, column spoolstarttime I'm heading out the door I can't step you throu

Re: load fom csv

2024-09-16 Thread Andy Hartman
in LOG 2024-09-16 12:55:37.295 EDT [428] ERROR: invalid byte sequence for encoding "UTF8": 0x00 2024-09-16 12:55:37.295 EDT [428] CONTEXT: COPY image_classification_master, line 1, column spoolstarttime On Mon, Sep 16, 2024 at 12:56 PM Adrian Klaver wrote: > On 9/16/24 09:46, Andy Hartman wro

Re: load fom csv

2024-09-16 Thread Adrian Klaver
On 9/16/24 09:46, Andy Hartman wrote: It Looks correct. $pgTable = "image_classification_master" Connect to the database with psql and look at the table name. I'm betting it is not image_classification_master. Instead some mixed or all upper case version of the name. I don't use PowerShel

Re: load fom csv

2024-09-16 Thread Andy Hartman
It Looks correct. $pgTable = "image_classification_master" On Mon, Sep 16, 2024 at 12:17 PM Adrian Klaver wrote: > On 9/16/24 09:12, Andy Hartman wrote: > > 2024-09-16 12:06:00.968 EDT [4968] ERROR: relation > > "image_classification_master" does not exist > > 2024-09-16 12:06:00.968 EDT [4

Re: load fom csv

2024-09-16 Thread Adrian Klaver
On 9/16/24 09:12, Andy Hartman wrote: 2024-09-16 12:06:00.968 EDT [4968] ERROR:  relation "image_classification_master" does not exist 2024-09-16 12:06:00.968 EDT [4968] STATEMENT:  COPY Image_Classification_Master FROM STDIN DELIMITER ',' CSV HEADER; I'm assuming this is from the Postgres lo

Re: load fom csv

2024-09-16 Thread Andy Hartman
2024-09-16 12:06:00.968 EDT [4968] ERROR: relation "image_classification_master" does not exist 2024-09-16 12:06:00.968 EDT [4968] STATEMENT: COPY Image_Classification_Master FROM STDIN DELIMITER ',' CSV HEADER; On Mon, Sep 16, 2024 at 11:52 AM Francisco Olarte wrote: > > > On Mon, 16 Sept 202

Re: load fom csv

2024-09-16 Thread Francisco Olarte
On Mon, 16 Sept 2024 at 17:36, Andy Hartman wrote: > I'm trying to run this piece of code from Powershell and it just sits > there and never comes back. There are only 131 records in the csv. > $connectionString = > "Host=$pgServer;Database=$pgDatabase;Username=$pgUser;Password=$pgPassword" > $co

Re: load fom csv

2024-09-16 Thread Ron Johnson
On Mon, Sep 16, 2024 at 11:36 AM Andy Hartman wrote: > I'm trying to run this piece of code from Powershell and it just sits > there and never comes back. There are only 131 records in the csv. > > $connectionString = > "Host=$pgServer;Database=$pgDatabase;Username=$pgUser;Password=$pgPassword" >

Re: load fom csv

2024-09-16 Thread Adrian Klaver
On 9/16/24 08:35, Andy Hartman wrote: I'm trying to run this piece of code from Powershell and it just sits there and never comes back. There are only 131 records in the csv. $connectionString = "Host=$pgServer;Database=$pgDatabase;Username=$pgUser;Password=$pgPassword" $copyCommand = "\COPY

load fom csv

2024-09-16 Thread Andy Hartman
I'm trying to run this piece of code from Powershell and it just sits there and never comes back. There are only 131 records in the csv. $connectionString = "Host=$pgServer;Database=$pgDatabase;Username=$pgUser;Password=$pgPassword" $copyCommand = "\COPY $pgTable FROM '$csvPath' DELIMITER ',' CSV