Re: [GENERAL] Blocking access by remote users for a specific time period

2014-12-13 Thread Michael Nolan
Yeah, a cron job to swap pg_hba.conf files is the best solution I've come
up with so far.  It's not one web app, it's closer to two dozen of them, on
multiple sites.
--
Mike Nolan

On Sat, Dec 13, 2014 at 11:10 PM, Adrian Klaver 
wrote:
>
> On 12/13/2014 08:13 PM, Michael Nolan wrote:
>
>> I have several web apps that access our Postgresql database that I'd
>> like to lock out of the database for about an hour during a weekly
>> maintenance interval. (There are some internal users that do not get
>> locked out, because they're running the maintenance tasks.)
>>
>> There are no time-of-day access limitation parameters in the pg_hba.conf
>> file, are there any simple ways to do this?
>>
>
> Use a cron job that at beginning of period swaps out the pg_hba.conf with
> one that denies access, reloads server and then at end of time period
> reverse procedure ?
>
>  --
>> Mike Nolan
>>
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>


Re: [GENERAL] Error: "Out of memory while reading tuples." in pushing table from SAS to PostgreSQL on Mac

2014-12-13 Thread Adrian Klaver

On 12/13/2014 08:03 PM, wetter wetterana wrote:

Hi,

I'm passing rows from SAS to PostgreSQL (I assign a libname and use a
PROC APPEND).  This works fine with smaller tables (~below 1 million
rows).  However, as tables get larger I receive the following error
messages:


This will need some more explaining for those of us that do not use SAS 
on a regular basis.


Or to put it another way, what exactly are you doing?




"ERROR: CLI describe error: Out of memory while reading tuples.; No
query has been executed with that handle"
and
"GLOBAL SYSDBMSG POSTGRES: Out of memory while reading tuples.; No query
has been executed with that handle
GLOBAL SYSDBRC HY000"


So where exactly are the above messages coming from, they do not look 
like Postgres messages?




I've tried to change memory settings on the PostgreSQL server, but can't
solve the problem.  As far as I could understand—I'm new to PostgreSQL
;)—it seems that PostgreSQL want to somehow read information on the
whole table before processing it and this behavior could eventually be
switched off, but I might be wrong here.


I thought the information was going from SAS to Postgres, so I am not 
sure why Postgres would need to read the table?




FYI:
- I run SAS 9.4 on a windows machine.
- I run PostgreSQL server on a MAC: PostgreSQL 9.3.5 on
x86_64-apple-darwin12.5.0, compiled by Apple LLVM version 5.1, 64-bit
   I've Pgadmin 1.18.1 installed.

Any help would be much appreciated!!

THANKS!


PS: For several reasons, I cannot use the bulkload feature in SAS for
this job.




--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Blocking access by remote users for a specific time period

2014-12-13 Thread Adrian Klaver

On 12/13/2014 08:13 PM, Michael Nolan wrote:

I have several web apps that access our Postgresql database that I'd
like to lock out of the database for about an hour during a weekly
maintenance interval. (There are some internal users that do not get
locked out, because they're running the maintenance tasks.)

There are no time-of-day access limitation parameters in the pg_hba.conf
file, are there any simple ways to do this?


Use a cron job that at beginning of period swaps out the pg_hba.conf 
with one that denies access, reloads server and then at end of time 
period reverse procedure ?



--
Mike Nolan



--
Adrian Klaver
adrian.kla...@aklaver.com


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Blocking access by remote users for a specific time period

2014-12-13 Thread Rob Sargent
Turn the app off?  Seems that's one of the selling points of web apps. Throw up 
a "under maint" page. 

Sent from my iPhone

> On Dec 13, 2014, at 9:13 PM, Michael Nolan  wrote:
> 
> I have several web apps that access our Postgresql database that I'd like to 
> lock out of the database for about an hour during a weekly maintenance 
> interval. (There are some internal users that do not get locked out, because 
> they're running the maintenance tasks.)  
> 
> There are no time-of-day access limitation parameters in the pg_hba.conf 
> file, are there any simple ways to do this?
> --
> Mike Nolan


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Blocking access by remote users for a specific time period

2014-12-13 Thread Michael Nolan
I have several web apps that access our Postgresql database that I'd like
to lock out of the database for about an hour during a weekly maintenance
interval. (There are some internal users that do not get locked out,
because they're running the maintenance tasks.)

There are no time-of-day access limitation parameters in the pg_hba.conf
file, are there any simple ways to do this?
--
Mike Nolan


[GENERAL] Error: "Out of memory while reading tuples." in pushing table from SAS to PostgreSQL on Mac

2014-12-13 Thread wetter wetterana
Hi,

I'm passing rows from SAS to PostgreSQL (I assign a libname and use a PROC
APPEND).  This works fine with smaller tables (~below 1 million rows).
However, as tables get larger I receive the following error messages:


"ERROR: CLI describe error: Out of memory while reading tuples.; No query
has been executed with that handle"
and
"GLOBAL SYSDBMSG POSTGRES: Out of memory while reading tuples.; No query
has been executed with that handle
GLOBAL SYSDBRC HY000"

I've tried to change memory settings on the PostgreSQL server, but can't
solve the problem.  As far as I could understand—I'm new to PostgreSQL
;)—it seems that PostgreSQL want to somehow read information on the whole
table before processing it and this behavior could eventually be switched
off, but I might be wrong here.

FYI:
- I run SAS 9.4 on a windows machine.
- I run PostgreSQL server on a MAC: PostgreSQL 9.3.5 on
x86_64-apple-darwin12.5.0, compiled by Apple LLVM version 5.1, 64-bit
  I've Pgadmin 1.18.1 installed.

Any help would be much appreciated!!

THANKS!


PS: For several reasons, I cannot use the bulkload feature in SAS for this
job.


Re: [GENERAL] Database and OS monitoring

2014-12-13 Thread Andy Colson

On 12/13/2014 12:55 PM, Edson Carlos Ericksson Richter wrote:

Dear list,

I've been searching in web for guidelines on OS (Linux) and PostgreSQL (9.3.5) 
active monitoring best practices.
Can someone share experiences?
I'm inclined to look at Cacti and Nagios. Any other experiences? Recommended 
books?
I don't want to use SaaS for monitoring - I'll have a cloud server hired 
specifically for this purpose, outside my main data center infrastructure.

Thanks in advance,

Edson




Stats are one thing, but errors are another.  I've found my best monitor is 
rsyslog and a perl script.

rsyslog.conf contains:

  local0.* action(type="omprog"
binary="/usr/local/bin/logMonitor.pl"
template="RSYSLOG_TraditionalFileFormat")

the perl script is sort of like:

while (<>)
{
emailme() if (/error/);
}

-Andy


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Database and OS monitoring

2014-12-13 Thread John R Pierce

On 12/13/2014 10:55 AM, Edson Carlos Ericksson Richter wrote:
I've been searching in web for guidelines on OS (Linux) and PostgreSQL 
(9.3.5) active monitoring best practices.

Can someone share experiences?
I'm inclined to look at Cacti and Nagios. Any other experiences? 
Recommended books?
I don't want to use SaaS for monitoring - I'll have a cloud server 
hired specifically for this purpose, outside my main data center 
infrastructure. 


Munin is another good choice, its like a much better implementation of 
Cacti.   It also comes with quite a few postgres monitoring graphs 
already setup, you just have to enable it to connect to your postgres 
server.




--
john r pierce  37N 122W
somewhere on the middle of the left coast



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Database and OS monitoring

2014-12-13 Thread Edson Carlos Ericksson Richter

Dear list,

I've been searching in web for guidelines on OS (Linux) and PostgreSQL 
(9.3.5) active monitoring best practices.

Can someone share experiences?
I'm inclined to look at Cacti and Nagios. Any other experiences? 
Recommended books?
I don't want to use SaaS for monitoring - I'll have a cloud server hired 
specifically for this purpose, outside my main data center infrastructure.


Thanks in advance,

Edson


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] pgbench

2014-12-13 Thread alikon
Hi,
can you share the  plsql procedure to call the query from pgbench
i'm running in the same issue cause i have a long query that i want to
submit to pgbench

There are any news for fix this pgbench issue ?



--
View this message in context: 
http://postgresql.nabble.com/pgbench-tp5773225p5830455.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general