Re: Database Cache Hit Ratio (Warning)

2020-03-31 Thread David G. Johnston
On Tuesday, March 31, 2020, Rajiv Ranjan wrote: > Hi, > > Received a Database cache hit ratio warning alert from one of the > monitoring tools, the threshold for the “database cache hit ratio %” is > 90% for a High and 95% for Critical > Does this unnamed monitoring tool (and undefined query) re

Database Cache Hit Ratio (Warning)

2020-03-31 Thread Rajiv Ranjan
Hi, Received a Database cache hit ratio warning alert from one of the monitoring tools, the threshold for the “database cache hit ratio %” is 90% for a High and 95% for Critical Below hardware, CPU, disk and memory utilization of the system. Kindly suggest the parameters for a cache hit ratio or

Re: Index selection issues with RLS using expressions

2020-03-31 Thread Alastair McKinley
Hi Tom, Thanks for looking at this! It seems like there are quite a few performance gotchas around leaky operators and RLS, this is my second encounter with this issue in the last few weeks. What would you recommend as a reasonable workaround? I have a large table with a gin index that I woul

Re: keeping images in a bytea field on AWS RDS

2020-03-31 Thread Christophe Pettus
> On Mar 31, 2020, at 13:52, Ron wrote: > initdb is definitely not what you want to do just to load an image into an > exiting database. I think there may be some confusion on the OP's part because many sources give out *advice* to put a filesystem path, rather than the entire actual binary

Re: keeping images in a bytea field on AWS RDS

2020-03-31 Thread Ron
On 3/31/20 2:49 PM, Richard Bernstein wrote: I am using postgresql on RDS. I need to upload an image to the table. I understand that I need to set the PGDATA directory and place the image file in it, before setting the path in the bytea field. But how do I set PGDATA if I don't have the ability

Re: keeping images in a bytea field on AWS RDS

2020-03-31 Thread Alan Hodgson
On Tue, 2020-03-31 at 15:49 -0400, Richard Bernstein wrote: > I am using postgresql on RDS. I need to upload an image to the table. > I understand that I need to set the PGDATA directory and place the > image file in it, before setting the path in the bytea field. But how > do I set PGDATA if I don

Re: keeping images in a bytea field on AWS RDS

2020-03-31 Thread Christophe Pettus
> On Mar 31, 2020, at 12:49, Richard Bernstein wrote: > > I am using postgresql on RDS. I need to upload an image to the table. I > understand that I need to set the PGDATA directory and place the image file > in it, before setting the path in the bytea field. But how do I set PGDATA if > I

keeping images in a bytea field on AWS RDS

2020-03-31 Thread Richard Bernstein
I am using postgresql on RDS. I need to upload an image to the table. I understand that I need to set the PGDATA directory and place the image file in it, before setting the path in the bytea field. But how do I set PGDATA if I don't have the ability to set an environment variable, and don't have a

Re: Index selection issues with RLS using expressions

2020-03-31 Thread Tom Lane
Alastair McKinley writes: > I am running in to an issue with RLS and index selection in my queries. I > created a toy example to try to illustrate the issue below. Postgres version > is PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled > by gcc (Debian 8.3.0-6) 8.3.0,

Index selection issues with RLS using expressions

2020-03-31 Thread Alastair McKinley
Hi all, I am running in to an issue with RLS and index selection in my queries. I created a toy example to try to illustrate the issue below. Postgres version is PostgreSQL 12.2 (Debian 12.2-2.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit. Is there some su

streaming slaves can't keep up?

2020-03-31 Thread Ben Chobot
We have a few busy 9.5 dbs, both streaming to a few slaves each. The master and slaves are identical hardware and are getting no small amount of load - about 45k transactions/s on the master and ~36k transactions/s on the slave actively serving clients. During these busy times, queries are all

Re: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?

2020-03-31 Thread Amitabh Kant
On Tue, Mar 31, 2020 at 5:58 PM Turritopsis Dohrnii Teo En Ming < c...@teo-en-ming.com> wrote: > Does phpMyAdmin support PostgreSQL? > > > > On 2020-03-31 20:15, Ben Madin wrote: > > and \q works in MySQL, so it may not be different anyway :) > > > > On Tue, 31 Mar 2020 at 08:18, Tom Lane wrote:

Re: migrate off oracle data to postgres

2020-03-31 Thread JC JC
Though I am not very experienced in this, I am working on a migration project from Oracle to Postgres using ora2pg from around 5+ months. The source data from which I migrate is of size 64 GB and I use AWS environment and run ora2pg in parallel by specifying the parameters in ora2pg utility. I m

Re: migrate off oracle data to postgres

2020-03-31 Thread Pepe TD Vo
@JC - I do have ora2pg set up last year in test environment already and that what I suggested team using insert script to run in Postgres.  And I am not sure how long it would take to load? 1T data. Though if there's a tool liked MySQL workbench to pull the oracle export data pump and import int

Re: migrate off oracle data to postgres

2020-03-31 Thread JC JC
I am sure you might be referring this https://ora2pg.darold.net/documentation.html You need to create ora2pg conf file with TYPE COPY, and ALLOW and remaining other attributes like ORACLE_DSN ORACLE_PWD ORACLE_USER similarly PG_DSN PG_USER PG_PWD etc etc. Cheers jc

Re: migrate off oracle data to postgres

2020-03-31 Thread Virendra Kumar
FDW for oracle and ora2pg both are too slow compared to offload data in a file and load into PostgreSQL. When I was doing one of my migrations I found the best solution was to download data using sqlldr on to the database host where PostgreSQL instance is running and load it using COPY command.

Re: migrate off oracle data to postgres

2020-03-31 Thread Adrian Klaver
On 3/31/20 8:51 AM, Pepe TD Vo wrote: I have tables ddl data definitions already.  Only need to move the data over off Oracle to Postgres PostgreSQL Foreign Data Wrapper for Oracle: http://laurenz.github.io/oracle_fdw/ -- Adrian Klaver adrian.kla...@aklaver.com

Re: migrate off oracle data to postgres

2020-03-31 Thread Pepe TD Vo
I have tables ddl data definitions already.  Only need to move the data over off Oracle to Postgres 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 call him a dog hardly seems to do him justice

Re: migrate off oracle data to postgres

2020-03-31 Thread JC JC
In my view ora2pg can do most of the stuff you requested. ora2pg can be used to generate the DDL from oracle to postgres based on attributes set in ora2pg conf file (for example TYPE TABLE, will allow getting oracle DDL in an output file, TYPE COPY will bring the data). No doubt you need to set

Re: pgAdmin4 installation on macOS installed a User: can I delete it?

2020-03-31 Thread Adrian Klaver
On 3/30/20 10:46 AM, Dummy Account wrote: Hello, I installed pgAdmin4, I believe the postgesSQL version is 12.  I'm running Mac OS X High Sierra 10.13.6 If you need other information to address my problem, please ask.  Please find attached screenshot. The pgAdmin4 installation, installed a Use

Re: migrate off oracle data to postgres

2020-03-31 Thread John Wiencek
You should explore EnterprisDB’s Migration ToolKit (MTK). Regards John Wiencek > On Mar 31, 2020, at 9:15 AM, Pepe TD Vo wrote: > > Hello, > > I have a huge data on Oracle, would you please suggest how to migrate all > data off Oracle to Postgres? Do I need to export into csv and upload to

migrate off oracle data to postgres

2020-03-31 Thread Pepe TD Vo
Hello, I have a huge data on Oracle, would you please suggest how to migrate all data off Oracle to Postgres?  Do I need to export into csv and upload to postgres?  Ora2pg is limited data from oracle to postgresql right? Bach-Nga No one in this world is pure and perfect.  If you avoid people fo

Re: Using compression on TCP transfer

2020-03-31 Thread Laurenz Albe
On Tue, 2020-03-31 at 15:13 +0300, Andrus wrote: > > It is a simple ALTER TABLE. > > Client is Visual FoxPro application. It sends data with trailing spaces > sometimes and sometimes not. > In case of varchar field values will appear in database sometimes with > trailing spaces and sometimes wit

Re: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?

2020-03-31 Thread Turritopsis Dohrnii Teo En Ming
Does phpMyAdmin support PostgreSQL? On 2020-03-31 20:15, Ben Madin wrote: and \q works in MySQL, so it may not be different anyway :) On Tue, 31 Mar 2020 at 08:18, Tom Lane wrote: Eric MacAdie writes: One thing that is different about Postgres is that it uses a lot of "meta-commands".

Re: Is PostgreSQL SQL Database Command Syntax Similar to MySQL/MariaDB?

2020-03-31 Thread Ben Madin
and \q works in MySQL, so it may not be different anyway :) On Tue, 31 Mar 2020 at 08:18, Tom Lane wrote: > Eric MacAdie writes: > > One thing that is different about Postgres is that it uses a lot of > > "meta-commands". > > https://www.postgresql.org/docs/current/app-psql.html > > An importan

Re: Using compression on TCP transfer

2020-03-31 Thread Andrus
Hi! It is a simple ALTER TABLE. Client is Visual FoxPro application. It sends data with trailing spaces sometimes and sometimes not. In case of varchar field values will appear in database sometimes with trailing spaces and sometimes without. This requires major application re-design which m

Re: Using compression on TCP transfer

2020-03-31 Thread Laurenz Albe
On Tue, 2020-03-31 at 11:29 +0300, Andrus wrote: > Databases contain lot of char(n) type fields containing ascii characters. > Most of fields contain less characters than field width. > Changing them to varchar is not easy. It is a simple ALTER TABLE. > Database is accessed from Debian Postgres 1

Re: Using compression on TCP transfer

2020-03-31 Thread Andrus
Hi! >Updated doc reference: >https://www.postgresql.org/docs/12/libpq-connect.html >They mention that compression is insecure and disabled by default. Taking this >into account, compression will require that both ODBC and PostgreSQL are set >>up with compression enabled. I could not figure out q

Re: Using compression on TCP transfer

2020-03-31 Thread Olivier Gautherot
Sorry, forgot the reply all :-) On Tue, Mar 31, 2020 at 11:39 AM Andrus wrote: > Hi, > > >See the section about sslcompression in > https://www.postgresql.org/docs/9.2/libpq-connect.html. It should be your > answer. > > I added > > sslcompression=1 > > to psqlodbc connection string but log file

Re: Using compression on TCP transfer

2020-03-31 Thread Andrus
Hi, >See the section about sslcompression in >https://www.postgresql.org/docs/9.2/libpq-connect.html. It should be your >answer. I added sslcompression=1 to psqlodbc connection string but log file shows that connection is still uncompressed: LOG: connection authorized: user=me database=my

Using compression on TCP transfer

2020-03-31 Thread Andrus
Hi! Databases contain lot of char(n) type fields containing ascii characters. Most of fields contain less characters than field width. Changing them to varchar is not easy. Database is accessed from Debian Postgres 12.2 over internet using psqlodbc with TLS v1.3. Mostly results seelct commands