Re: [GENERAL] pgaduit - is there a way to audit a role

2017-10-31 Thread David Steele
On 10/30/17 6:48 PM, rakeshkumar464 wrote: > Is there a way to audit a group like as follows > > alter role db_rw set pgaudit.log = 'read,write,function,ddl' > > and then any user part of db_rw role can be audited automatically. It does > not seem to work if I connect to the db as rakesh who

Re: [GENERAL] VM-Ware Backup of VM safe?

2017-09-20 Thread David Steele
On 9/20/17 7:36 AM, PT wrote: > On Wed, 20 Sep 2017 10:03:15 +0200 > Thomas Güttler wrote: > >> We run a PostgreSQL 9.6 server in a virtual machine. >> >> The virtual machine is managed by the customer. >> >> He does backup the VM. >> >> Is this enough, is this

Re: [GENERAL] Checking data checksums...

2016-12-17 Thread David Steele
On 12/16/16 5:07 AM, ma...@kset.org wrote: > I enabled data checksums (initdb --data-checksums) on a new instance and > was wandering is there a command in the psql console, or from the linux > console, to force a checksum check on the entire cluster and get error > reports if it finds some

Re: [GENERAL] pgAudit_Analyze - parse error in pgaudit_analyze.log

2016-12-14 Thread David Steele
On 12/14/16 10:06 PM, Dylan Luong wrote: > > /Can't call method "parse" on an undefined value at ./pgaudit_analyze > line 509, <$hFile> line 282./ > > /at ./pgaudit_analyze line 44/ This looks like the issue that appears to be fixed by this pull request:

Re: [GENERAL] Wal files - Question | Postgres 9.2

2016-11-28 Thread David Steele
On 11/24/16 8:05 PM, Patrick B wrote: > hmm.. I really don't get it. > > > > If I get messages like: > > *cp: cannot stat '/walfiles/00021AF800A5': No such file or > director*y > > In my head, it's saying that it was unable to recover that file and, > because of that, there is

Re: [GENERAL] What is the best thing to do with PUBLIC schema in Postgresql database

2016-11-04 Thread David Steele
On 11/4/16 3:58 PM, Hu, Patricia wrote: Since it could potentially be a security loop hole. So far the action taken to address it falls into these two categories: drop the PUBLIC schema altogether. One of the concerns is with some of the system objects that have been exposed through

Re: [GENERAL] WAL segmentes names in wrong order?

2016-11-03 Thread David Steele
On 11/3/16 1:16 PM, Tom DalPozzo wrote: so if I understand right, the ...DE file's previous name, was less than ...C6, then it was renamed in big advance for later use. I was missing this advance. That is correct. -- -David da...@pgmasters.net -- Sent via pgsql-general mailing list

Re: [GENERAL] WAL segmentes names in wrong order?

2016-11-03 Thread David Steele
On 11/3/16 12:28 PM, Tom DalPozzo wrote: Hi, I found, in pg_xlog dir, several WAL segment files with old modification timestamp but with their names greater than more recent files. Ex.: 000100C6 modified today 000100DE modified yesterday This is

Re: [GENERAL] restore a specific schema from physical backup

2016-07-29 Thread David Steele
On 7/29/16 5:31 PM, Rakesh Kumar wrote: >> Are you saying that?: >> >> 1) You ran pg_basebackup against a live cluster and sent the output to >> another location. >> >> 2) At the other location the cluster is not in use. >> >> 3) You want to grab the contents of the inactive cluster directly off

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-19 Thread David Steele
On 3/17/16 7:00 PM, Tom Lane wrote: > David Steele <da...@pgmasters.net> writes: >> On 3/17/16 5:07 PM, David G. Johnston wrote: >>> Figured out it had to be added to 2016-09...done > >> Hmm ... this patch is currently marked "needs review" in CF

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-19 Thread David Steele
On 3/17/16 5:07 PM, David G. Johnston wrote: > Figured out it had to be added to 2016-09...done Hmm ... this patch is currently marked "needs review" in CF 2016-03. Am I missing something, should this have been closed? -- -David da...@pgmasters.net -- Sent via pgsql-general mailing list

Re: [GENERAL] Hot standby and xlog on a ramdisk

2016-02-04 Thread David Steele
On 2/4/16 9:46 AM, Tore Halvorsen wrote: > On Thu, Feb 4, 2016 at 3:30 PM, Scott R Mead > wrote: > >> > Can a hot standby run correctly with the xlog-files on a >> ramdisk? >> > >> >> Yes, but, if you lose any,

Re: [GENERAL] Offline Tablespaces and Partial Restore

2016-01-12 Thread David Steele
On 1/12/16 6:02 AM, Pedro França wrote: > Yea, we are considering doing all the function calls and access to > tables with dblink and see how bad this would hurt performance. It will > be tough to explain this to the SQL Server guys. You should consider using the Postgres FDW

Re: [GENERAL] Offline Tablespaces and Partial Restore

2016-01-11 Thread David Steele
On 1/11/16 8:41 AM, Pedro França wrote: I've tried to put the data on another database but it didn't help as tablespaces are required cluster-wide on startup. If putting the data in a separate database works for you then it wouldn't be a big leap to put it in a separate cluster.

Re: [GENERAL] - PostgreSQL Replication Types

2015-12-17 Thread David Steele
Hi Will, On 12/17/15 10:17 AM, Will McCormick wrote: > I inherited a 9.1 replication environment > > Few basic questions that I can't find clear answers / clarifications for > if possible: > > 3 types of replication in 9.1 I've read about from the offical docs: > > 1) warm standby This is a

Re: [GENERAL] postgresql 9.3 failover time

2015-12-14 Thread David Steele
On 12/12/15 2:08 PM, Shay Cohavi wrote: > *I have postgresql 9.3 setup with 2 nodes (active/standby with streaming > replication & continuos archiving).* > *I have created 2 failover & failback script in order to perform a > switchover between the DB servers:* > *1. failover - create a trigger

Re: [GENERAL] Complete Recovery 9.4.4

2015-12-11 Thread David Steele
On 12/11/15 3:55 PM, Will McCormick wrote: > Basic backup and recovery question. I want to perform complete restore > and recovery using continuous archive mode. > > Lets imagine we have a single table MYTABLE. Here are my high level steps > > 1) Add a record A) to MYTABLE > 2) Take a file

Re: [GENERAL] Pgbasebackup help

2015-12-04 Thread David Steele
On 12/2/15 6:25 PM, Jim Nasby wrote: On 12/2/15 1:56 PM, David Steele wrote: >Also, I don’t want enable archive_mode = on as it needs to maintain >archives files. As it turns out, archiving would be the solution to your problem. If you were archiving you could restore a*previous*

Re: [GENERAL] Pgbasebackup help

2015-12-04 Thread David Steele
On 12/3/15 12:59 AM, Yelai, Ramkumar IN BLR STS wrote: What I wanted to achieve is simple copy of Data folder. I can't shutdown the database during the backup and unable to use file system copy of data folder as it creates inconsistency and don't want to use pg_dump. Hence I decided to use

Re: [GENERAL] Pgbasebackup help

2015-12-02 Thread David Steele
On 11/30/15 6:28 AM, Yelai, Ramkumar IN BLR STS wrote: > Hi All, > > I need some help in postgresql base backup. > > We are currently using multiple DBMS in our project and postgresql is > one of them. Our private DBMS keeps the online data and postgresql keeps > online as well as historical

Re: [GENERAL] psql --quiet

2015-10-27 Thread David Steele
On 10/27/15 3:16 PM, Leo Baltus wrote: postgresql-9.4.5 When running pg_stop_backup() psql outputs on stderr: NOTICE: pg_stop_backup complete, all required WAL segments have been archived --quiet does not seem to suppress it, what does? This should work: set client_min_messages='warning';

Re: [GENERAL] psql --quiet

2015-10-27 Thread David Steele
On 10/27/15 3:32 PM, David Steele wrote: On 10/27/15 3:16 PM, Leo Baltus wrote: postgresql-9.4.5 When running pg_stop_backup() psql outputs on stderr: NOTICE: pg_stop_backup complete, all required WAL segments have been archived --quiet does not seem to suppress it, what does? This should

Re: [GENERAL] Use tar to online backup has an error

2015-09-24 Thread David Steele
On 9/24/15 9:29 AM, Yves Dorfsman wrote: On 2015-09-24 03:55, maxiangqian wrote: /bin/tar: /data/test/PG_9.0_201008051/20001/2451: Cannot stat: No such file or directory /bin/tar: Error exit delayed from previous errors and /data/test/PG_9.0_201008051/20001/2451 file is not exist.

Re: [GENERAL] Use tar to online backup has an error

2015-09-24 Thread David Steele
On 9/24/15 10:15 AM, Stephen Frost wrote: * David Steele (da...@pgmasters.net) wrote: It's actually perfectly normal for files to disappear during a backup, even when pg_start_backup() is called first (never perform file-level backup with calling pg_start_backup()). The database *without

Re: [GENERAL] Broken primary key after backup restore.

2015-09-18 Thread David Steele
On 9/18/15 3:44 PM, Michael Chau wrote: Hi Jeff, Only if you are very lucky. If your tar command tars up the pg_xlog directory as the last thing it does, then you are probably going to be OK. Otherwise, it is a crap shoot. May be that's it. I have another similar set up, but the pg_xlog

Re: [GENERAL] error on online backup using pg_basebackup tool

2015-09-05 Thread David Steele
On 9/3/15 5:07 PM, Joseph Kregloh wrote: > You can always move the folder out of there. Depending on the version of > PostgreSQL different steps need to be take. If I remember correctly for > version 9.3 you can move the symlink to point to the new directory. Pre > 9.3 you need to move the symlink

Re: [GENERAL] pg_start_backup: file has vanished from pg_subtrans/

2015-08-08 Thread David Steele
On 8/7/15 7:01 AM, Leo Baltus wrote: While backing up some postgresql-8.4.2 instances using pg_start_backup()/pg_stop_backup() We noticed that sometimes rsync complains: file has vanished: ./data/pg_subtrans/3A37 rsync warning: some files vanished before they could be transferred

Re: [GENERAL] Backup Method

2015-07-09 Thread David Steele
backup with daily incremental/differential should be very efficient. -- - David Steele da...@pgmasters.net signature.asc Description: OpenPGP digital signature

Re: [GENERAL] Performance on DISABLE TRIGGER

2015-02-28 Thread David Steele
-locks.html -- - David Steele da...@pgmasters.net signature.asc Description: OpenPGP digital signature

Re: [GENERAL] ANALYZE after CREATE TABLE AS SELECT...

2015-02-26 Thread David Steele
based solely on sampling of the heap. -- - David Steele da...@pgmasters.net signature.asc Description: OpenPGP digital signature

Re: [GENERAL] ANALYZE after CREATE TABLE AS SELECT...

2015-02-26 Thread David Steele
. Bonus tip: the same is true for any temp tables you might create. More so, since vacuum will never see them at all. -- - David Steele da...@pgmasters.net signature.asc Description: OpenPGP digital signature

Re: [GENERAL] Locking during UPDATE query with SUBSELECT

2015-02-25 Thread David Steele
. -- - David Steele da...@pgmasters.net signature.asc Description: OpenPGP digital signature

Re: [GENERAL] Row-level Security vs Application-level authz

2015-02-24 Thread David Steele
On 2/24/15 3:07 PM, Stephen Frost wrote: * David Steele (da...@pgmasters.net) wrote: On 2/23/15 8:16 PM, Stephen Frost wrote: * David G. Johnston (david.g.johns...@gmail.com) wrote: I take it that the table has to be permanent otherwise you would have suggested and unlogged temporary table

Re: [GENERAL] Row-level Security vs Application-level authz

2015-02-24 Thread David Steele
On 2/24/15 3:31 PM, Stephen Frost wrote: * David Steele (da...@pgmasters.net) wrote: On 2/24/15 3:07 PM, Stephen Frost wrote: The problem with a temporary table is, well, it goes away. :) There are further concerns that, because it's created in some fashion by the single application user

Re: [GENERAL] Row-level Security vs Application-level authz

2015-02-24 Thread David Steele
than ideal. I've certainly used session-scope temp tables to good effect a number of times. Transaction-scope would be another story of course. Am I missing something? -- - David Steele da...@pgmasters.net signature.asc Description: OpenPGP digital signature

Re: [GENERAL] Postgres architecture for multiple instances

2015-02-21 Thread David Steele
to give a lot of information, but the optimal solution depends on how your customers connect to their database: 1) Entirely through an application or API 2) Directly to the db via psql, PgAdmin, JDBC, etc. Without that information it's hard to give really solid advice. -- - David Steele da