Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 6:28 PM, pepevo wrote: Yes, and I am thank you for all your helps.  As I said and if you contract for Govt you should know,  we can't just install the software without their approval.   When someone suggested psql client to run batch script when I can't putty into the AWS instance. 

Re: Conflict with recovery on PG version 11.6

2020-06-19 Thread Toomas Kristin
Hi Laurenz, > Yes, that are conflicts with VACUUM. Thank you for help. hot_standby_feedback did what I expected (no lag on replication and no session termination) and case is closed. Only it is foggy for me how it can be when no logs about vacuuming from that time window when session is active

[HELP] Query regarding logical replication slot

2020-06-19 Thread Praveen Kumar K S
Hello, I'm running Postgres9.6 and configured master/slave with synchronous replication (synchronous_commit set to remote_apply) . In addition to that I have one logical replication slot on master. When master fails and one of the slaves is promoted to master, how can I have that logical replicati

Re: create batch script to import into postgres tables

2020-06-19 Thread David G. Johnston
On Friday, June 19, 2020, pepevo wrote: > But everything can run by script on the server, right? > Separation of concerns. The server with the database cluster should probably not be running application code. Application code can be run other machine, “admin” machine is one label. Though for

Re: create batch script to import into postgres tables

2020-06-19 Thread David G. Johnston
On Friday, June 19, 2020, pepevo wrote: > We can't just install any softwares without Goverment's approval. Also, > they might ask Oracle/mysql/sql can run batch script, why not Postgres? I > wonder myself and just realize today from this email. > PostreSQL isn’t the issue here, you are. To t

Re: Minor Upgrade Question

2020-06-19 Thread Susan Joseph
OK I will try that, thanks On 6/17/2020 11:19 AM, Joshua Drake wrote: Susan You can use -Uvh to upgrade the rpms on the existing machine. You can then use symlinks to link the expected pgsql data directories. Make sure you take a backup, and stop the service before you proceed. JD On Tue,

Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 12:26 PM, Pepe TD Vo wrote: thank you for all the information but I have no problem connecting to the database using pgAdmin and/or directly psql from the postgres database. I need to set up a batch/cron job to run in Linux/AWS to ingest the data.  Therefore pgadmin GUI is not an op

Re: create batch script to import into postgres tables

2020-06-19 Thread Rob Sargent
> On Jun 19, 2020, at 1:26 PM, Pepe TD Vo wrote: > > thank you for all the information but I have no problem connecting to the > database using pgAdmin and/or directly psql from the postgres database. > > I need to set up a batch/cron job to run in Linux/AWS to ingest the data. > Therefore

Re: create batch script to import into postgres tables

2020-06-19 Thread Pepe TD Vo
thank you for all the information but I have no problem connecting to the database using pgAdmin and/or directly psql from the postgres database. I need to set up a batch/cron job to run in Linux/AWS to ingest the data.  Therefore pgadmin GUI is not an option. I used pgAdmin to create tables, tr

Re: running a batch script

2020-06-19 Thread Adrian Klaver
On 6/19/20 8:30 AM, Richard Bernstein wrote: I am trying to test out a package called phpGrid and I need to run through its tutorial. But there are some "kinks". I am developing on my ubuntu laptop in a docker container. The postgresql I need to test-to is AWS RDS Postgresql.  I have an account

Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 8:30 AM, cgerard...@gmail.com wrote: There is an alternate solution, which is to launch pgadmin GUI, connect to the database, tick « save password » Then psql won’t prompt fir password any more. Pretty sure that is only within the context of pgAdmin. Pay however attention to the s

Re: running a batch script

2020-06-19 Thread Richard Bernstein
You're welcome. It is not real data: It was just a sample. On Fri, Jun 19, 2020 at 12:08 PM Paul Förster wrote: > Hi, > > > On 19. Jun, 2020, at 17:30, Richard Bernstein > wrote: > > > > thanks for posting all private data to a public list! > > Can some list admin please delete at least the at

Re: running a batch script

2020-06-19 Thread Paul Förster
Hi, > On 19. Jun, 2020, at 17:30, Richard Bernstein wrote: > thanks for posting all private data to a public list! Can some list admin please delete at least the attached script? It contains lots of private data. No wonder, there are millions and millions of leaked personal information reco

Re: Netapp SnapCenter

2020-06-19 Thread Stephen Frost
Greetings, * Paul Förster (paul.foers...@gmail.com) wrote: > When I wrote our backup mode script I read the deprecation note about the > exclusive mode backup. This is why I decided to go with non-exclusive to be > ready when exclusive backup mode is finally removed some day. Yet, I don't > see

Re: create batch script to import into postgres tables

2020-06-19 Thread cgerard999
There is an alternate solution, which is to launch pgadmin GUI, connect to the database, tick « save password » Then psql won’t prompt fir password any more. Pay however attention to the security concern. Sent from my mobile phone > Le 19 juin 2020 à 17:07, Pepe TD Vo a écrit : > >  > app

Re: create batch script to import into postgres tables

2020-06-19 Thread Pepe TD Vo
appreciate for clarification, all inputs and teaching me more in PostgreSQL have a good weekend and happy father's day to all who is Father. v/r,  Bach-Nga No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love, and forgive more.To

Re: create batch script to import into postgres tables

2020-06-19 Thread David G. Johnston
On Fri, Jun 19, 2020 at 7:33 AM Adrian Klaver wrote: > On 6/19/20 7:17 AM, pepevo wrote: > > I understand your post about "password does not take an argument, it is > > meant to be used as is. The purpose is to force a password prompt." When > > I used -W and --password=. That's what I said I wi

Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 7:52 AM, David G. Johnston wrote: On Fri, Jun 19, 2020 at 6:58 AM Adrian Klaver > wrote: On 6/19/20 6:53 AM, Pepe TD Vo wrote: > Thank you sir and I am sorry for the typo not having "--" on password. > I did spelling out with --passw

Re: create batch script to import into postgres tables

2020-06-19 Thread David G. Johnston
On Fri, Jun 19, 2020 at 6:58 AM Adrian Klaver wrote: > On 6/19/20 6:53 AM, Pepe TD Vo wrote: > > Thank you sir and I am sorry for the typo not having "--" on password. > > I did spelling out with --password=mypassword > > Please go back and read my post again. > To be clear, there is no way to s

Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 7:17 AM, pepevo wrote: I understand your post about "password does not take an argument, it is meant to be used as is. The purpose is to force a password prompt." When I used -W and --password=.  That's what I said I will try pgpassfile. Thought it like mysq/oracle can indicate out

Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 6:53 AM, Pepe TD Vo wrote: Thank you sir and I am sorry for the typo not having "--" on password. I did spelling out with --password=mypassword Please go back and read my post again. echo select count(*) from tableA; | "C:\Program Files\PostgreSQL\11\bin\psql" -U PSmasteruser -d

Re: create batch script to import into postgres tables

2020-06-19 Thread Pepe TD Vo
Thank you sir and I am sorry for the typo not having "--" on password.  I did spelling out with --password=mypassword >> echo select count(*) from tableA; | "C:\Program >>Files\PostgreSQL\11\bin\psql" -U PSmasteruser -d PSCIDR -h >>hostname.amazonaws.com -p 5432 --password=mypassword even -W fo

Re: Conflict with recovery on PG version 11.6

2020-06-19 Thread Laurenz Albe
On Fri, 2020-06-19 at 11:46 +0300, Toomas Kristin wrote: > I executed a database dump with 4 jobs and here are logs how this ended. > > 2020-06-19 02:38:28 UTC:[30953]:ERROR:40001:canceling statement due to > conflict with recovery > 2020-06-19 02:38:28 UTC:[30953]:DETAIL:User query might have ne

Re: HASH partitioning not working properly

2020-06-19 Thread Laurenz Albe
On Fri, 2020-06-19 at 13:27 +0530, Srinivasa T N wrote: > > > How can I see the output of hash function that is used internally? > > > > In the case of "integer", the hash function is "pg_catalog"."hashint4". > > I guess output formatting is wrong, any help? > > postgres=# select pg_catalog.hashi

Re: create batch script to import into postgres tables

2020-06-19 Thread Adrian Klaver
On 6/19/20 4:12 AM, Pepe TD Vo wrote: thank you,   I tried that too, remove the quote around the echo and it prompt for password, as I mentioned no matter I put -P mypassword no matter what I spell out password=mypassword still argument error Once again -P has nothing to do with password. Also

Re: HASH partitioning not working properly

2020-06-19 Thread Srinivasa T N
On Fri, Jun 19, 2020, 5:45 PM Amul Sul wrote: > On Fri, Jun 19, 2020 at 3:50 PM Srinivasa T N wrote: > > > > > > > > On Fri, Jun 19, 2020 at 3:09 PM Amul Sul wrote: > >> > >> On Fri, Jun 19, 2020 at 1:28 PM Srinivasa T N > wrote: > >> > > >> > On Fri, Jun 19, 2020 at 12:34 PM Laurenz Albe < >

Re: HASH partitioning not working properly

2020-06-19 Thread Amul Sul
On Fri, Jun 19, 2020 at 3:50 PM Srinivasa T N wrote: > > > > On Fri, Jun 19, 2020 at 3:09 PM Amul Sul wrote: >> >> On Fri, Jun 19, 2020 at 1:28 PM Srinivasa T N wrote: >> > >> > On Fri, Jun 19, 2020 at 12:34 PM Laurenz Albe >> > wrote: >> >> >> >> On Fri, 2020-06-19 at 12:12 +0530, Srinivasa T

Re: create batch script to import into postgres tables

2020-06-19 Thread Pepe TD Vo
thank you,   I tried that too, remove the quote around the echo and it prompt for password, as I mentioned no matter I put -P mypassword no matter what I spell out password=mypassword still argument error >>echo select count(*) from tableA; | "C:\Program Files\PostgreSQL\11\bin\psql" >>-U PSmast

Re: HASH partitioning not working properly

2020-06-19 Thread Srinivasa T N
On Fri, Jun 19, 2020 at 3:09 PM Amul Sul wrote: > On Fri, Jun 19, 2020 at 1:28 PM Srinivasa T N wrote: > > > > On Fri, Jun 19, 2020 at 12:34 PM Laurenz Albe > wrote: > >> > >> On Fri, 2020-06-19 at 12:12 +0530, Srinivasa T N wrote: > >> > On Fri, Jun 19, 2020 at 11:44 AM David Rowley > wrote:

Re: HASH partitioning not working properly

2020-06-19 Thread Amul Sul
On Fri, Jun 19, 2020 at 1:28 PM Srinivasa T N wrote: > > On Fri, Jun 19, 2020 at 12:34 PM Laurenz Albe > wrote: >> >> On Fri, 2020-06-19 at 12:12 +0530, Srinivasa T N wrote: >> > On Fri, Jun 19, 2020 at 11:44 AM David Rowley wrote: >> > > On Fri, 19 Jun 2020 at 17:42, Srinivasa T N wrote: >> >

Re: Conflict with recovery on PG version 11.6

2020-06-19 Thread Toomas Kristin
Hi, Thank you all for help. > FWIW in case you haven't tried yet, if you could find a DETAILS: line > following to the ERROR: canceling.." message in server log, it would > narrow the possibility. I executed a database dump with 4 jobs and here are logs how this ended. 2020-06-19 02:38:28 UTC

Re: HASH partitioning not working properly

2020-06-19 Thread Srinivasa T N
On Fri, Jun 19, 2020 at 12:34 PM Laurenz Albe wrote: > On Fri, 2020-06-19 at 12:12 +0530, Srinivasa T N wrote: > > On Fri, Jun 19, 2020 at 11:44 AM David Rowley > wrote: > > > On Fri, 19 Jun 2020 at 17:42, Srinivasa T N wrote: > > > >After seeing the below, I feel partitioning is not workin

Re: A query in Streaming Replication

2020-06-19 Thread Kyotaro Horiguchi
At Sat, 13 Jun 2020 23:12:25 +0530, Sreerama Manoj wrote in > Hello, > > Forgot to add the version details. I'm using postgres 10.7 . > > On Sat, Jun 13, 2020, 20:26 Sreerama Manoj > wrote: > > > Hello, > > I use streaming replication in async mode. When master gets down, > > slave wil

Re: HASH partitioning not working properly

2020-06-19 Thread Laurenz Albe
On Fri, 2020-06-19 at 12:12 +0530, Srinivasa T N wrote: > On Fri, Jun 19, 2020 at 11:44 AM David Rowley wrote: > > On Fri, 19 Jun 2020 at 17:42, Srinivasa T N wrote: > > >After seeing the below, I feel partitioning is not working properly or > > > it maybe case that my understanding is wrong