Re: pg_basebackup && long time storage of wal_archive/ content

2020-04-14 Thread Laurenz Albe
On Wed, 2020-04-15 at 08:16 +0200, Matthias Apitz wrote: > > > The run (as user 'postgres') on the server of the cmd: > > > > > > pg_basebackup -U ${DBSUSER} -Ft -z -D > > > /data/postgresql11/backup-wal_archive-20200414-1/ > > > > >

Re: pg_basebackup && long time storage of wal_archive/ content

2020-04-14 Thread Matthias Apitz
-z -D > > /data/postgresql11/backup-wal_archive-20200414-1/ > > > > produces correctly the following situtation on the server: > > > > srap32dxr1:/data/postgresql11 # ls -ltrh backup-20200414-1 > > total 1.7G > > -rw--- 1 postgres postgres 1.7G

Help needed with XMLTABLE

2020-04-14 Thread Dilip Kumar
One of our customers tried to use XMLTABLE syntax without row_expression, which works fine with ORACLE but doesn't work with PostgreSQL. So can anyone suggest what alternative we can use? CREATE TABLE user_pool_clean ( fk_user_pool_pk bytea NOT NULL, user_id character varying(255) NOT NUL

Re: pg_basebackup && long time storage of wal_archive/ content

2020-04-14 Thread Adrian Klaver
On 4/14/20 8:00 AM, Matthias Apitz wrote: Hello, The run (as user 'postgres') on the server of the cmd: pg_basebackup -U ${DBSUSER} -Ft -z -D /data/postgresql11/backup-wal_archive-20200414-1/ produces correctly the following situtation on the server: srap32dxr1:/data/postgre

pg_basebackup && long time storage of wal_archive/ content

2020-04-14 Thread Matthias Apitz
Hello, The run (as user 'postgres') on the server of the cmd: pg_basebackup -U ${DBSUSER} -Ft -z -D /data/postgresql11/backup-wal_archive-20200414-1/ produces correctly the following situtation on the server: srap32dxr1:/data/postgresql11 # ls -ltrh backup-20200414-1 total 1.7G -r

Re[2]: Invalid name syntax on to_regrole(session_user)

2020-04-14 Thread Ц
Thank you for clarification! PS: Re-reading initial message, I feel ashamed for such foolish questions. >Вторник, 14 апреля 2020, 17:04 +03:00 от Tom Lane : > >=?UTF-8?B?0KY=?= < pf...@mail.ru > writes: >> create role "dot.net" >> set session authorization 'dot.net'; >> select to_regrole(session

Re: Invalid name syntax on to_regrole(session_user)

2020-04-14 Thread Tom Lane
=?UTF-8?B?0KY=?= writes: > create role "dot.net" > set session authorization 'dot.net'; > select to_regrole(session_user); ERROR: invalid name syntax Well, we've got this: regression=> select session_user; session_user -- dot.net (1 row) which is reasonable: that output shouldn't

Invalid name syntax on to_regrole(session_user)

2020-04-14 Thread Ц
Hello! I store pg_roles.oid::int as numeric representation of database role. Now I need to get this number for session user. I used to_regrole(session_user) function. Everything works fine till I allow roles with dots in role`s name. create role "dot.net" set session authorization 'dot.net'; sel

AW: Which commands are guaranteed to drop role

2020-04-14 Thread Zwettler Markus (OIZ)
> -Ursprüngliche Nachricht- > Von: Laurenz Albe > Gesendet: Sonntag, 12. April 2020 22:09 > An: Andrus ; pgsql-general > Betreff: Re: Which commands are guaranteed to drop role > > On Sun, 2020-04-12 at 00:25 +0300, Andrus wrote: > > User "currentuser" tries to delete role "roletodelete