Re: [ADMIN] implement BLP model on Postgresql db

2010-11-21 Thread Scott Ribe
tions-info.html> If you have a lot of pre-existing tables to which the access info must be added, you might want to use dynamic sql to automate adding that column. But, given that "I should add a additional column in my data base tables that show the level of access of each row" see

Re: [ADMIN] pg v. 8.4.5 misses objects and data after restoring from backup using wal

2010-12-30 Thread Scott Ribe
On Dec 30, 2010, at 4:03 AM, Imre Oolberg wrote: > 3. issued pg_start_backup('test') while script is still running Well, yeah. Your procedure is going to get you a consistent snapshot of the state of the database when you issued that command. -- Scott Ribe scott_r...@elevated

Re: [ADMIN] Re: pg v. 8.4.5 misses objects and data after restoring from backup using wal

2011-01-03 Thread Scott Ribe
; filesystem, right? Yes, but the database is recovered to the consistent state as of the pg_start_backup command, as I pointed out to you before. Results of transactions that commit after the pg_start_backup command will not be in the backed up database. -- Scott Ribe scott_r...@elevated-

Re: [ADMIN] Re: pg v. 8.4.5 misses objects and data after restoring from backup using wal

2011-01-03 Thread Scott Ribe
is earlier post, he is *not* copying WAL that was generated between start & stop. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://ww

Re: [ADMIN] unknown log messages

2011-01-05 Thread Scott Ribe
Could it be an automatic process, kicked off by cron or some such, running as root, and not specifying the db or user, therefore defaulting to root & root? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing

Re: [ADMIN] unknown log messages

2011-01-05 Thread Scott Ribe
with > unknown user. No, they are standard for root trying to connect to the database when you do not have a db user named root. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)

Re: [ADMIN] Migrating a live database

2011-01-18 Thread Scott Ribe
's --partial in case you have to stop it in the middle of a large file. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] Postgres Backup Utility

2011-01-22 Thread Scott Ribe
ial. Just don't type DDL directly into a psql session, edit it in your favorite text editor, in a document called updates-pending.sql, and copy & paste into psql. Sometimes a tiny bit of *process* can actually help productivity ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www

Re: [ADMIN] Replication to less secure slave server

2011-01-25 Thread Scott Ribe
to the local port that is the remote end of that tunnel. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] unix timestamp

2011-04-21 Thread Scott Ribe
her you want the date based on local or UTC, so you'll have to figure that part out. Anyway, for more info, see the date & time functions docs: <http://www.postgresql.org/docs/9.0/static/functions-datetime.html> -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (3

[ADMIN] validating database integrity

2011-04-25 Thread Scott Ribe
pg files are ok? Yeah, battery-backed cache does no good if the driver is crap... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http

Re: [ADMIN] PostgreSQL logs filling up file system due to duplicate key error

2011-05-28 Thread Scott Ribe
submitting transactions and failing. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] revoked permissions on table still allows users to see table's structure

2011-07-22 Thread Scott Ribe
On Jul 22, 2011, at 12:09 PM, Dinesh Bhandary wrote: > ...but it will be nice to have a strictly read only user who can just see > data of the assigned objects and nothing else. Surely you mean data & structure of the assigned objects and no other objects? -- Scott Ribe scott_r..

Re: [ADMIN] Read-only postgres instance

2011-08-09 Thread Scott Ribe
Creating a temp table is not a read-only operation. On Aug 9, 2011, at 11:19 AM, pasman pasmaƄski wrote: > What with queries need temporary tables? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pg

Re: [ADMIN] compare integer to inet

2011-08-19 Thread Scott Ribe
On Aug 19, 2011, at 4:24 PM, Bill MacArthur wrote: > select case when '41.224.0.0'::inet = 702545920 then true else false end; If addition works, maybe subtraction works. So subtract 0? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: [ADMIN] commiting transaction from outside

2011-10-03 Thread Scott Ribe
now for sure that the client app has completed the transaction, rather than making a partial update? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to yo

Re: [ADMIN] streaming replication

2011-11-07 Thread Scott Ribe
ter if they're not many changes.) 2) Why is an hour to bring the old master up to date such a problem? Are you planning on failing over that frequently? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (

Re: [ADMIN] streaming replication

2011-11-07 Thread Scott Ribe
han sending all the data over the network: rsync -av rsync-user@host:/source /dest -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] streaming replication

2011-11-07 Thread Scott Ribe
On Nov 7, 2011, at 10:36 AM, Kevin Grittner wrote: > Perhaps this is an unexpected learning opportunity for me. If there > is no daemon running on the other end, what creates the remote > checksums? rsync--it invokes rsync on the other end by default. -- Scott Ribe scott_r...@elevate

Re: [ADMIN] error while loading data into table

2011-11-10 Thread Scott Ribe
On Nov 10, 2011, at 7:01 AM, Karuna Karpe wrote: > what's wrong in above. why not able to connect to database?? Your disk is full? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgr

Re: [ADMIN] rsync and streaming replication

2011-11-14 Thread Scott Ribe
um on files that have identical sizes & mod times, thus catching files that have different contents despite having the same mod times & sizes. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-

Re: [ADMIN] rsync and streaming replication

2011-11-14 Thread Scott Ribe
var/opt/hosting/db/profiles/profiles/ Well, there's one error. Your command is rsync'ing each file individually, so of course each file is sync'd. Sync the directories instead--in other words leave off the * (but not the /) and let rsync decide which files need sync'ing. -- Sco

Re: [ADMIN] rsync and streaming replication

2011-11-15 Thread Scott Ribe
e data in the files in the > transfer (and this is prior to any reading that will be done to > transfer changed files), so this can slow things down significantly. " Seriously, read that and what I said. They are the same, except that the documentation provides more detail. --

Re: [ADMIN] rsync and streaming replication

2011-11-15 Thread Scott Ribe
eaves open the question as to why rsync is so slow in that, when we know it is usually relatively fast to sync two servers with few differences. Would be nice to actually hear from OP regarding file sizes/counts & network bandwidth & disks & and so on ;-) -- Scott Ribe scott_r...@eleva

Re: [ADMIN] rsync and streaming replication

2011-11-16 Thread Scott Ribe
On Nov 16, 2011, at 9:37 AM, Jean-Armel Luce wrote: > So, rsync --checksum looks better than rsync --all --all??? What the heck is that and why were you using it? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mail

Re: [ADMIN] rsync and streaming replication

2011-11-16 Thread Scott Ribe
here watching, sometimes --progress can be informative... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] rsync and streaming replication

2011-11-17 Thread Scott Ribe
& checksumming. (Some of my earlier comments were based on the belief that your db was 20GB.) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscript

Re: [ADMIN] CLUSTER command

2012-01-18 Thread Scott Ribe
he table on some index, but was not documented, how do I now find out what that index was". -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to yo

Re: [ADMIN] CLUSTER command

2012-01-18 Thread Scott Ribe
On Jan 18, 2012, at 1:09 PM, Rick Dicaire wrote: > No, I know what the indexes are. The scenario is there's 3 tables in > the db that get clustered. Wanted to know in what order those 3 tables > are reclustered when CLUSTER is exec'd with no args. Ah, I see now. Sorry for th

Re: [ADMIN] Starting postgres server on mac os x 10.6.8

2012-02-04 Thread Scott Ribe
Find the log file and see what it says. On Feb 4, 2012, at 9:50 PM, Andrew Barinov wrote: > Why is the postgres not starting? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)

Re: [ADMIN] Starting postgres server on mac os x 10.6.8

2012-02-05 Thread Scott Ribe
s being run under does not have permission to do that. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] Starting postgres server on mac os x 10.6.8

2012-02-05 Thread Scott Ribe
y of a thousand other different ways. You do need to know where it is of course, and you've used some package manager that puts pg pieces in non-standard locations, so I can't help you with that other than refer you to the docs, if there are any, for that install. -- Scott Ribe

Re: [ADMIN] Starting postgres server on mac os x 10.6.8

2012-02-05 Thread Scott Ribe
le is put in from the tarball installation? What tarball? I'm not aware of any such thing, and in a quick look did not see it. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) T

Re: [ADMIN] Starting postgres server on mac os x 10.6.8

2012-02-05 Thread Scott Ribe
uot;easy" installer to "help" Mac users are kind of a mixed bag; it may be nice to not have to understand as much UNIX & pg to start, but then if anything goes wrong, you're kind of lost. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-05

Re: [ADMIN] Problems with pg_restore (plpgsql already exists)

2012-02-25 Thread Scott Ribe
get away without doing that, and I am one of those people who often ignores that advice and does things the easier way until it breaks, but it is safer. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-ad

Re: [ADMIN] Update actions (with user name) inside PostgreSQL DB - any version on postgreSQL

2012-03-14 Thread Scott Ribe
ently non-auditable setup that needs to be audited, and you're not going to fix that with some magic setting somewhere. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make c

Re: [ADMIN] Update actions (with user name) inside PostgreSQL DB - any version on postgreSQL

2012-03-14 Thread Scott Ribe
;sudo" (w/o quotes) at > the beginning of each command they want to run (i.e. sudo psql db_name > "insert into"). Sure, you mean like this command: sudo su root ??? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: [ADMIN] Update actions (with user name) inside PostgreSQL DB - any version on postgreSQL

2012-03-14 Thread Scott Ribe
7;t want to advertise is, in my opinion, trivially obvious--but I'll respect the idea and not advertise it. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make ch

Re: [ADMIN] Backup/disaster recovery and bandwidth (long)

2012-04-25 Thread Scott Ribe
appropriately, or set up WAL archiving. Note that you could even provide a more up-to-date database for your people to work with. If the testbed is nearly up to date, then an rsync to update it would take very little time. So you could shut down the replica, rsync, and bring the replica back up

Re: [ADMIN] Detecting DB corruption

2012-10-31 Thread Scott Ribe
ld have it run periodically. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] MySQL Blackhole Engine

2012-11-06 Thread Scott Ribe
s whose default storage engine is BLACKHOLE -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] NEED REPLICATION SOLUTION -POSTGRES 9.1

2012-11-28 Thread Scott Ribe
On Nov 28, 2012, at 11:06 AM, suhas.basavaraj12 wrote: > Need expert advice on this scenario.Can we reduce downtime in any way ..?? You can use the Slony replication system: <http://slony.info/> -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0

Re: [ADMIN] Unable to reload postgresql.conf without restarting

2013-01-03 Thread Scott Ribe
e changing the right postgresql.conf, that the server wasn't started with a different one than you think. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes t

Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

2013-02-07 Thread Scott Ribe
On Feb 6, 2013, at 5:58 PM, Mel Llaguno wrote: > Any pointers which would explain these differences would be greatly > appreciate. Postgres is likely not the only thing on your system that allocates shared memory. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com

Re: [ADMIN] Primary DB stuck becuase of unavailable standby (synchronized streaming) - please help

2013-04-18 Thread Scott Ribe
unavailable secondary Postgres? No, that's what synchronous means. What you're describing is asynchronous, and it seems like you should consider using asynchronous replication. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent v

Re: [ADMIN] postgres user with automate rsync and private/public key pairs

2013-06-14 Thread Scott Ribe
On Jun 14, 2013, at 5:31 AM, Ian Lawrence Barwick wrote: > Looking at /var/log/auth.log might provide more clues. as might ssh -vvv -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-ad

Re: [ADMIN] PG wiki updated with query to show unindexed foreign keys

2013-07-09 Thread Scott Ribe
On Jul 7, 2013, at 5:29 PM, bricklen wrote: > Suggestions and feedback welcome on the query referenced in the link above. Lack of quoting of identifiers means that it will croak on a database that uses mixed-case identifiers. -- Scott Ribe scott_r...@elevated-dev.com http://www.eleva

Re: [ADMIN] PG wiki updated with query to show unindexed foreign keys

2013-07-09 Thread Scott Ribe
On Jul 9, 2013, at 6:29 PM, bricklen wrote: > On Tue, Jul 9, 2013 at 5:02 PM, Scott Ribe > wrote: > On Jul 7, 2013, at 5:29 PM, bricklen wrote: > > > Suggestions and feedback welcome on the query referenced in the link above. > > Lack of quoting of identifiers means

Re: [ADMIN] logging or debugging to report time to establish a database connection

2013-07-12 Thread Scott Ribe
d be good also for debugging connection problems, showing what host is being attempted, what the resolution (if any) of the host name is, connection opened or not, authentication passed or not, and so on; 2) enhancements to the /conninfo command to provide more details. -- Scott Ribe scott_r...@el

Re: [ADMIN] logging or debugging to report time to establish a database connection

2013-07-12 Thread Scott Ribe
ional outlier at 500+ us--of course that's with a pgbouncer config with a big enough pool that I never have to wait for a connection to become free. On Jul 12, 2013, at 9:21 AM, Scott Ribe wrote: > On Jul 12, 2013, at 9:00 AM, Mike Broers wrote: > >> Is there something I am o

Re: [ADMIN] logging or debugging to report time to establish a database connection

2013-07-12 Thread Scott Ribe
ant I inserted timers in some C code, and looped through some calls to PQconnectdb. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www

Re: [ADMIN] postgres crashes on insert in 40 different threads

2013-08-19 Thread Scott Ribe
n adjust the value of oom_score_adj in startup script to prevent > OOMKiller to kill Postmaster > 3. You can lower shared_buffers, work_mem and max_connections. 4. Use pgbouncer, and radically lower the number of pg connections used. -- Scott Ribe scott_r...@elevated-dev.com http://www.ele

Re: [ADMIN] postgres crashes on insert in 40 different threads

2013-08-19 Thread Scott Ribe
any threads it takes to saturate IO capacity. If you actually tried to *run* 550 processes at the same time, you'd just be wasting time on contention. So, back to the question I just asked a minute ago in the prior email, do you have any idea how many pg connections are actually being used? -

Re: [ADMIN] postgres crashes on insert in 40 different threads

2013-08-19 Thread Scott Ribe
tion when it starts, and will closed it - only when killed. But > threads performing background jobs - it means they running always, so I > keep connection always open. So, 40 threads, not 440? Was 440 connections a typo, or are there 400 connections you aren't telling us about?

Re: [ADMIN] postgres crashes on insert in 40 different threads

2013-08-19 Thread Scott Ribe
On Aug 19, 2013, at 9:22 AM, Dzmitry wrote: > I am using pgpool to balance load to slave servers. So, to be clear, you're not using pgbouncer after all? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mail

Re: [ADMIN] postgres crashes on insert in 40 different threads

2013-08-24 Thread Scott Ribe
t slash the number of connections everywhere by 1/2, or even 1/4 and see what effect that had. Then as a second step I'd look at where connection pooling might be used effectively. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via p

Re: [ADMIN] postgres crashes on insert in 40 different threads

2013-08-25 Thread Scott Ribe
smaller number... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin

Re: [ADMIN] Catch exceptions outside function

2013-09-18 Thread Scott Ribe
On Sep 18, 2013, at 5:53 AM, Roberto Grandi wrote: > Do you have any suggestion for me? After the timeout, roll back the current transaction. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-ad

Re: [ADMIN] Catch exceptions outside function

2013-09-18 Thread Scott Ribe
tion, which must eventually be committed or rolled back... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin