Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread hubert depesz lubaczewski
On Fri, Aug 27, 2021 at 05:23:23PM -0400, Tom Lane wrote: > Those queries are coming from getFormattedTypeName(), which is used > for function arguments and the like. I'm not quite sure why Hubert > is seeing 5000 such calls in a database with only ~100 functions; > surely they don't all have an a

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread hubert depesz lubaczewski
On Fri, Aug 27, 2021 at 05:23:23PM -0400, Tom Lane wrote: > I experimented with the attached, very quick-n-dirty patch to collect > format_type results during the initial scan of pg_type, instead. On the > regression database in HEAD, it reduces the number of queries pg_dump > issues from 3260 to

Re: Idempotent DDL Updates

2021-08-27 Thread Julien Rouhaud
On Sat, Aug 28, 2021 at 2:19 AM Miles Elam wrote: > > What is the general consensus within the community on idempotent DDL scripts, > ie. consistent usage of IF EXISTS/IF NOT EXISTS/OR REPLACE for SQL init files > that get checked into source control? > [...] > The drawbacks I've run across are

Re:

2021-08-27 Thread obi reddy
Dear Gogala Pg_RMAN is not support on windows machine. I have small about the can I set the archive_commnad and I will take the wal files like incremental backup. On Sat, 28 Aug 2021, 1:15 am Mladen Gogala, wrote: > On 8/27/21 8:59 AM, Ravi Krishna wrote: > >> > >> how to take incremental bac

Re: Unexpected block ID found when reading data

2021-08-27 Thread Gilar Ginanjar
Hi, sorry it's been a long time to reply. It throw the same errors. I can't find any solution. It frustrated me and i've been on a break since. ;) > On 5 Aug 2021, at 00.50, Vijaykumar Jain > wrote: > > On Tue, 3 Aug 2021 at 20:37, Gilar Ginanjar > wrote

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Tom Lane
Adrian Klaver writes: > On 8/27/21 2:23 PM, Tom Lane wrote: >> Those queries are coming from getFormattedTypeName(), which is used >> for function arguments and the like. I'm not quite sure why Hubert >> is seeing 5000 such calls in a database with only ~100 functions; >> surely they don't all ha

Re: use fopen unknown resource

2021-08-27 Thread ourdiaspora
‐‐‐ Original Message ‐‐‐ On Friday, August 27th, 2021 at 11:10 PM, Adrian Klaver wrote: > https://www.php.net/manual/en/pdo.pgsqlcopyfromfile.php > " public PDO::pgsqlCopyFromFile( string $table_name, string $filename, " Sorry but do not understand; the line does not explain

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (t...@sss.pgh.pa.us) wrote: > >> I experimented with the attached, very quick-n-dirty patch to collect > >> format_type results during the initial scan of pg_type, instead. On the > >> regression database in

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Tom Lane
Stephen Frost writes: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> I experimented with the attached, very quick-n-dirty patch to collect >> format_type results during the initial scan of pg_type, instead. On the >> regression database in HEAD, it reduces the number of queries pg_dump >> issues fro

Re: use fopen unknown resource

2021-08-27 Thread Adrian Klaver
On 8/27/21 2:59 PM, ourdiaspora wrote: Readers, Objective, to import a csv file into postgresql database. If understood correctly, the manual section 'fopen' (https://www.php.net/manual/en/function.fopen.php) shows that the file has a "known resource" extant name. Please what is the syntax to

use fopen unknown resource

2021-08-27 Thread ourdiaspora
Readers, Objective, to import a csv file into postgresql database. If understood correctly, the manual section 'fopen' (https://www.php.net/manual/en/function.fopen.php) shows that the file has a "known resource" extant name. Please what is the syntax to assign an unknown file name to the 'fop

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Laurenz Albe writes: > > On Thu, 2021-08-26 at 18:06 +0200, hubert depesz lubaczewski wrote: > >> In total, there were 5000 queries: > >> SELECT pg_catalog.format_type('[0-9]+'::pg_catalog.oid, NULL) > >> But there were only 83 separate oids tha

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Adrian Klaver
On 8/27/21 2:23 PM, Tom Lane wrote: Laurenz Albe writes: On Thu, 2021-08-26 at 18:06 +0200, hubert depesz lubaczewski wrote: In total, there were 5000 queries: SELECT pg_catalog.format_type('[0-9]+'::pg_catalog.oid, NULL) But there were only 83 separate oids that were scanned. That is a str

Re: Idempotent DDL Updates

2021-08-27 Thread Rob Sargent
> On Aug 27, 2021, at 1:32 PM, Adrian Klaver wrote: > > On 8/27/21 11:19 AM, Miles Elam wrote: >> What is the general consensus within the community on idempotent DDL >> scripts, ie. consistent usage of IF EXISTS/IF NOT EXISTS/OR REPLACE for SQL >> init files that get checked into source co

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Tom Lane
Laurenz Albe writes: > On Thu, 2021-08-26 at 18:06 +0200, hubert depesz lubaczewski wrote: >> In total, there were 5000 queries: >> SELECT pg_catalog.format_type('[0-9]+'::pg_catalog.oid, NULL) >> But there were only 83 separate oids that were scanned. > That is a strong argument for using a hash

Re: Idempotent DDL Updates

2021-08-27 Thread Adrian Klaver
On 8/27/21 11:19 AM, Miles Elam wrote: What is the general consensus within the community on idempotent DDL scripts, ie. consistent usage of IF EXISTS/IF NOT EXISTS/OR REPLACE for SQL init files that get checked into source control? My experience has been that it's much easier to manage than a

Re:

2021-08-27 Thread Mladen Gogala
On 8/27/21 8:59 AM, Ravi Krishna wrote: how to take incremental backup in postgresql windows machine. AFAIK PG has no concept of incremental backup. pgbackrest has, but not sure whether it runs on Windows. PG_RMAN can do incremental backups. I think it does the same thing as Oracle  witho

Re:

2021-08-27 Thread Atul Kumar
Hi, You can try to make a batch script in windows for taking incremental backup and schedule it in windows scheduler. Regards Atul On Friday, August 27, 2021, obi reddy wrote: > Hi everyone. > > how to take incremental backup in postgresql windows machine. > > > Thank you And Regards >

Idempotent DDL Updates

2021-08-27 Thread Miles Elam
What is the general consensus within the community on idempotent DDL scripts, ie. consistent usage of IF EXISTS/IF NOT EXISTS/OR REPLACE for SQL init files that get checked into source control? My experience has been that it's much easier to manage than an ever-growing set of migration files, but

Re: pg_dump - increase in backup time - log

2021-08-27 Thread Tom Lane
Adrian Klaver writes: > On 8/27/21 8:27 AM, Marc wrote: >> We want to dig into it but we lack a detailled pg_dump log. We used >> verbose mode but unfortunately this lacks a date time stamp. >> No changes on the server neither. > The Postgres server log should have timestamped log entries though

Re: Problem with connecting with named host parameter

2021-08-27 Thread Mike Martin
On Fri, 27 Aug 2021 at 15:00, Tom Lane wrote: > Mike Martin writes: > > I am getting the following error when I connect with hostname on > localhost > > > psql -h capture -U -p 5432 > > psql: error: FATAL: no pg_hba.conf entry for host > > "fe80::7285:c2ff:feb0:cd4%eth0", user "usevideo", dat

Re: pg_dump - increase in backup time - log

2021-08-27 Thread Adrian Klaver
On 8/27/21 8:27 AM, Marc wrote: Hello, Suddenly the time required to backup with pg_dump increased suddenly drastically ( + 20min on a backuptime of 2 hours ) no comparable increase of data which could explain the behaviour. What is the pg_dump command you are using? We want to dig into i

Please help: pgAdmin 4 on Amazon Linux 2

2021-08-27 Thread Blake McBride
Greetings, I am trying to install pgAdmin 4 on Amazon Linux 2. PostgreSQL is already installed and working fine. I believe Amazon Linux 2 is based on RedHat. I am doing the following: [root@a-1lxumlkkw4mu4 ~]# rpm -i https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/pgadmin4-redhat-repo-2-1.

pg_dump - increase in backup time - log

2021-08-27 Thread Marc
Hello, Suddenly the time required to backup with pg_dump increased suddenly drastically ( + 20min on a backuptime of 2 hours ) no comparable increase of data which could explain the behaviour. We want to dig into it but we lack a detailled pg_dump log. We used verbose mode but unfortunately

Re: Manual failover cluster

2021-08-27 Thread Saul Perdomo
Are you sure that it is *mandatory*? Because from my recollection I've only needed to set one manually when (for one reason or another) my recovery attempt fails and then I'm in what the docs call a "complex re-recovery situation" -- not a fun time: recovery_target_timeline (string) Specifies rec

Re: Problem with connecting with named host parameter

2021-08-27 Thread Tom Lane
Mike Martin writes: > I am getting the following error when I connect with hostname on localhost > psql -h capture -U -p 5432 > psql: error: FATAL: no pg_hba.conf entry for host > "fe80::7285:c2ff:feb0:cd4%eth0", user "usevideo", database "usevideos", SSL > off Evidently, your DNS setup is re

Problem with connecting with named host parameter

2021-08-27 Thread Mike Martin
Hi I am getting the following error when I connect with hostname on localhost psql -h capture -U -p 5432 psql: error: FATAL: no pg_hba.conf entry for host "fe80::7285:c2ff:feb0:cd4%eth0", user "usevideo", database "usevideos", SSL off The hba.conf is local all all

Re:

2021-08-27 Thread Ravi Krishna
> > > how to take incremental backup in postgresql windows machine. > AFAIK PG has no concept of incremental backup. pgbackrest has, but not sure whether it runs on Windows.

[no subject]

2021-08-27 Thread obi reddy
Hi everyone. how to take incremental backup in postgresql windows machine. Thank you And Regards Obireddy.G

Re: Can we get rid of repeated queries from pg_dump?

2021-08-27 Thread Laurenz Albe
On Thu, 2021-08-26 at 18:06 +0200, hubert depesz lubaczewski wrote: > Now for query stats. > > To dump it all, pg_dump needed 9173 queries (logged by > log_min_duration_statement = 0 for this user). > > I extracted all queries to separate files, and made stats. In total there were > only 4257 uni

Re: Issue with a query while running on a remote host

2021-08-27 Thread Karsten Hilbert
Deep packet inspection naively scanning for potential fragments of bash scripts being transferred ? Karsten Am Fri, Aug 27, 2021 at 12:32:09PM +0530 schrieb Ninad Shah: > Date: Fri, 27 Aug 2021 12:32:09 +0530 > From: Ninad Shah > To: pgsql-general > Subject: Issue with a query while running on

Issue with a query while running on a remote host

2021-08-27 Thread Ninad Shah
Hello All, While working with a PostgreSQL database, I came across an issue where data is not being fetched over the network. Version : PostgreSQL 11.10 Operating system : RHEL 8.4 *Issue description:* We tried to execute the below query on the database host using psql prompt, it works without