Re: perl path issue

2019-05-13 Thread Prakash Ramakrishnan
Hi Adrian, Yes am using edb standard edition and installed pgbackrest in prod and dev. nothing different am trying to restore the backup prod to dev cluster . * Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.5: cannot open shared object file: No su

Re: perl path issue

2019-05-13 Thread Ravi Krishna
what does ls /usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so return? If there is no such file, then it means that on the dev server perl DBD was installed differently than prod. I am assuming LD_LIBRARY_PATH is also correctly set. apologize if my advise is wrong. It has been eons since I worked w

Re: perl path issue

2019-05-13 Thread Achilleas Mantzios
On 13/5/19 12:20 μ.μ., Prakash Ramakrishnan wrote: Hi Adrian, Yes am using edb standard edition and installed pgbackrest in prod and dev. nothing different am trying to restore the backup prod to dev cluster . * Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so' for module DBD::Pg: l

Re: perl path issue

2019-05-13 Thread Prakash Ramakrishnan
Hi Ravi, Path is there , ==> ls /usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so /usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so postg...@sydcosausd001.enterprisenet.org:/home/postgres and perl DBD also installed but it cant load that is the issue please advise me. Regards, Prakash.R On Mon, Ma

Re: perl path issue

2019-05-13 Thread Ravi Krishna
> and perl DBD also installed but it cant load that is the issue please advise > me. what is the output of LD_LIBRARY_PATH on both dev and prod

Re: perl path issue

2019-05-13 Thread Prakash Ramakrishnan
Hi Ravi, Please find the below details, Dev: ==> echo $LD_LIBRARY_PATH /usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE:/opt/rh/rh-perl526/root/usr/lib64:/usr/lib64/perl5/CORE:/opt/edb/languagepack-10/Perl-5.24/lib/CORE postg...@sydcosausd001.enterprisenet.org:/home/postgres Prod: ==

Re: logical replication initiate via manual pg_dump

2019-05-13 Thread Vijaykumar Jain
update: i dropped all the indexes on the dest db tables, but the primary key and unique constraints from base tables in logical replication to ensure replica identity. and retriggered the logical replication from scratch. it completed in 4 hours. (which otherwise ran for 4 days) so i guess it was

Re: perl path issue

2019-05-13 Thread Achilleas Mantzios
On 13/5/19 12:54 μ.μ., Prakash Ramakrishnan wrote: Hi Ravi, Please find the below details, what does : # ldd /usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so say? Dev: ==> echo $LD_LIBRARY_PATH /usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE:/opt/rh/rh-perl526/root/usr/lib64:/usr/lib64/pe

terminating walsender process due to replication timeout

2019-05-13 Thread AYahorau
Hello PostgreSQL Community! I faced an issue on my linux machine using Postgres 11.3 . I have 2 nodes in db cluster: master and standby. I tried to perform a plenty of long-running queries which lead to the databases desynchronization: terminating walsender process due to replication timeout He

Re: perl path issue

2019-05-13 Thread Adrian Klaver
On 5/13/19 2:20 AM, Prakash Ramakrishnan wrote: Hi Adrian, Yes am using edb standard edition and installed pgbackrest in prod and dev. To be clear your have on the prod server: 1) Postgres installed via EDB installer. 2) You have pgBackRest. 3) You can take a backup using pgBackRest from th

Re: perl path issue

2019-05-13 Thread Prakash Ramakrishnan
Hi Adrian, I did in pgbackrest installation below commands in prod server. yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rp m yu

Re: perl path issue

2019-05-13 Thread Adrian Klaver
On 5/13/19 7:03 AM, Prakash Ramakrishnan wrote: Hi Adrian, I did in pgbackrest installation below commands in prod server. yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rp

Re: perl path issue

2019-05-13 Thread Prakash Ramakrishnan
Hi Adrian, Please find the details, ==> ldd /usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so linux-vdso.so.1 => (0x7fffddd8f000) libpq.so.5 => /usr/lib64/perl5/CORE/libpq.so.5 (0x7f5ecdbd6000) libm.so.6 => /lib64/libm.so.6 (0x7f5ecd8d4000) libc.so.6 => /

Re: perl path issue

2019-05-13 Thread Ravi Krishna
> > ==> ldd /usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so > linux-vdso.so.1 => (0x7fffddd8f000) > libpq.so.5 => /usr/lib64/perl5/CORE/libpq.so.5 (0x7f5ecdbd6000) I may be wrong, but is the above path in the

Re: perl path issue

2019-05-13 Thread Prakash Ramakrishnan
Hi Ravi, I tried manually export the lib path multiple times not working. prod: ==> echo $LD_LIBRARY_PATH /usr/lib64/perl5/CORE:/opt/app/PostgreSQL/10/lib:/opt/edb/languagepack-10/Perl-5.24/lib/CORE:/opt/app/PostgreSQL/10/lib dev --- ==> echo $LD_LIBRARY_PATH /usr/lib/perl5/5.10.0/i386-linux-th

Re: Upgrading locale issues

2019-05-13 Thread Peter Eisentraut
On 2019-05-03 15:35, Daniel Verite wrote: > 'b' < 'a' is never true for any locale AFAIK, But there is 'bb' < 'aa' in Danish. :-) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: perl path issue

2019-05-13 Thread Adrian Klaver
On 5/13/19 8:14 AM, Prakash Ramakrishnan wrote: Hi Ravi, I tried manually export the lib path multiple times not working. ==> pgbackrest --stanza=A4_sydcosafpp001 --log-level-console=info --db-path=/Postgres/prakash_pgbackrest --delta  --process-max=2 --db-include=A4_Copy restore --repo1-p

does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
Hello, we are almost out of disk space on one of our servers (99% full). If we run pg_dump to a diff location, does it require any additional disk space on our current server? I am asking, because on some other software, a backup might open transaction which keeps growing and eventually consume

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 10:59 AM, Julie Nishimura wrote: Hello, we are almost out of disk space on one of our servers (99% full). If we run pg_dump to a diff location, does it require any additional disk space on our current server? I am asking, because on some other software, a backup might open transacti

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
We have added new disk volume and about to introduce new tablespace using this additional disk space. After that, I am going to alter all user dbs (and template db as well) by runnig the following command: CREATE TABLESPACE vol4 OWNER postgres LOCATION '/data/vol4'; ALTER DATABASE user_db_1 SET

Re: Migrating an application with Oracle temporary tables

2019-05-13 Thread Michael Lewis
*I did find a scenario where this approach does run into trouble. That is, if the function/procedure is executed against the permanent table and then you go to run it against a temporary table. In that case, I do get the wrong answer, and I haven't yet figured out how to reset that without droppi

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 12:33 PM, Julie Nishimura wrote: We have added new disk volume and about to introduce new tablespace using this additional disk space. After that, I am going to alter all user dbs (and template db as well) by runnig the following command: Not sure why you need to move the template d

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
Adrian, thanks for your reply. Couple of clarifications/questions: 1) we are on 8.3 for this server 2) I was under impression, that "ALTER DATABASE name SET TABLESPACE new_tablespace" won't move anything, and just utilize the new_tablespace for new tables/indexes. If we would want to move existin

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Rob Sargent
8 is very old but in 9.4 the doc says The fourth form (your example) changes the default tablespace of the database. Only the database owner or a superuser can do this; you must also have create privilege for the new tablespace. This command *physically moves* any tables or indexes in the dat

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Karsten Hilbert
On Mon, May 13, 2019 at 07:33:58PM +, Julie Nishimura wrote: > We have added new disk volume and about to introduce new > tablespace using this additional disk space. After that, I am > going to alter all user dbs (and template db as well) by > runnig the following command: > > CREATE TABLESPA

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
yeah, good idea. Thanks everybody From: karsten.hilb...@gmx.net on behalf of Karsten Hilbert Sent: Monday, May 13, 2019 2:12 PM To: pgsql-general@lists.postgresql.org Subject: Re: does postgresql backup require additional space on disk On Mon, May 13, 2019 at 0

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 1:26 PM, Julie Nishimura wrote: Adrian, thanks for your reply. Couple of clarifications/questions: 1) we are on 8.3 for this server 8.3 does not have ALTER DATABASE name SET TABLESPACE : https://www.postgresql.org/docs/8.3/sql-alterdatabase.html It does appear until 8.4. 2) I was

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
Adrian, thanks for your reply. I previously found this link, which mentioned 8.2, that is why I assumed it will work with 8.3. Too bad we don't have dev with the same version. I guess I will create new tablespace using new vol, move the smallest db for which I have backup, create new test table

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 3:27 PM, Julie Nishimura wrote: Adrian, thanks for your reply. I previously found this link, which mentioned 8.2, that is why I assumed it will work with 8.3. No, what the link showed is: ALTER DATABASE mydatabase SET default_tablespace = mynewtablespace That is is the same as chan

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
Adrian, I think in my first emails in this chain about the effort i did specified it properly: CREATE TABLESPACE vol4 > OWNER postgres > LOCATION '/data/vol4'; > > ALTER DATABASE user_db_1 > SET default_tablespace = 'vol4'; > > ...for all dbs.. Then "default" part got lost in emails...:) _

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 4:53 PM, Julie Nishimura wrote: Adrian, I think in my first emails in this chain about the effort i did specified it properly: CREATE TABLESPACE vol4 OWNER postgres LOCATION '/data/vol4'; ALTER DATABASE user_db_1 SET default_tablespace = 'vol4'; ...for all dbs.. Then "default"

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
LOL. Adrian, I so appreciate your help. So, since this server is obviously very old, and it seems like 3 other tablespaces were added in the past (vol1 - 2.7 tb, vol2 - 2.7 tb, vol3 - 16 tb), and I am about to add another vol - vol4 (4 tb), I am trying to see where the objects are actually loca

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 5:39 PM, Julie Nishimura wrote: LOL. Adrian, I so appreciate your help. So, since this server is obviously very old, and it seems like 3 other tablespaces were added in the past (vol1 - 2.7 tb, vol2 - 2.7 tb, vol3 - 16 tb), and I am about to add another vol - vol4 (4 tb), I am tryin

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Julie Nishimura
er_temp=# select * from pg_tables where tablename = 'test'; schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers +---++++--+- public | test | build || f

Re: does postgresql backup require additional space on disk

2019-05-13 Thread Adrian Klaver
On 5/13/19 5:56 PM, Julie Nishimura wrote: er_temp=# select * from pg_tables where tablename = 'test';  schemaname | tablename | tableowner | tablespace | hasindexes | hasrules | hastriggers +---++++--+-  public     |

psql dones't reflect exit status if input command via stdin

2019-05-13 Thread magodo
Hello, I found when running command like `# echo "xxx" | psql postgres postgres`, the return code is always 0 even though the command ("xxx") here is of invalid syntax. While the `psql -c` way handled exit code correctly. In the meanwhile, mysql client handled both cases correctly. --- Zhaotin

Re: psql dones't reflect exit status if input command via stdin

2019-05-13 Thread David G. Johnston
On Mon, May 13, 2019 at 11:24 PM magodo wrote: > I found when running command like `# echo "xxx" | psql postgres > postgres`, the return code is always 0 even though the command ("xxx") > here is of invalid syntax. While the `psql -c` way handled exit code > correctly. > Its only required to han