Re: [GENERAL] create trigger in postgres to check the password strength

2017-02-03 Thread Vladimir Rusinov
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047

On Fri, Feb 3, 2017 at 3:55 PM, PAWAN SHARMA 
wrote:

>
> On Fri, Feb 3, 2017 at 9:11 PM, Adam Brusselback <
> adambrusselb...@gmail.com> wrote:
>
>> Whoops, accidentally sent this to only Pawan instead of the list:
>>>
>>>
>> Hey there, so I would highly suggest you avoid arbitrary password
>> strength policies like that.  I wrote a library for my company which we use
>> for password strength estimation, but it is written in Java.  I've been
>> thinking about how to port it to pl/pgsql so it could easily be packaged as
>> an extension and used natively in Postgres, but I just haven't had time to
>> get around to that yet.  Here it is for reference: https://github.com/
>> GoSimpleLLC/nbvcxz
>>
>> If you're actually interested in having an extension which works like the
>> above, and want to work on porting it, i'd be more than happy to jump in
>> and help out where I can. I just don't have the free cycles to do it my
>> self at the moment.
>>
>> Now on to your original question...Why wouldn't it be possible to create
>> a trigger on your users table to check the password being inserted, raise
>> an error if it does not meet your requirement, or hash it if it does and
>> continue the insert?  Seems pretty straight forward other than the
>> complexity of actually estimating how secure a password is.
>>
>
>
> Thanks Adam, but here the requirement to enforce password polices while
> creating to the users.
>
> create user abc with password 'Password';
>
> where it will test that the password entered should be according to the
> company standard, while creation of users.
> So please suggest.
>

Consider using PAM authentication where you can insert any of already
existing password strength checks.
Or, maybe, LDAP auth where stuff will be enforced by LDAP server.

-- 
Vladimir Rusinov
Storage SRE, Google Ireland


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [GENERAL] pgbench initialize

2016-12-16 Thread Vladimir Rusinov
Depends on goals of your benchmarking.
What are you trying to achieve?

Initialization and vacuuming each time will help achieve more consistent
best-case numbers (to reduce variance, I'd also destroy cluster completely
and clean up hardware, e.g. run fstrim in case of SSD, etc).

If you are however after real-world numbers, you may want to initialize
once and run pgbench for hours if not days to get full effects of
autovaccuum and other possible background processes.

On Thu, Dec 15, 2016 at 10:17 PM Anirudh Jayakumar <
jayakumar.anir...@gmail.com> wrote:

> Hi,
>
> I have a couple of questions regarding pgbench. I'm new to PostgreSQL and
> databases in general, so these might be very trivial questions.
>
> 1. Is it necessary to initialize pgbench(-i option) before every run to
> get consistent results?
>
> 2. The vacuuming process after initialize consumes time, what are the ill
> effects of disabling post-initialize vacuuming?
>
> Thanks,
> Anirudh
>


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [GENERAL] Extension compatibility between postgresql minor version

2016-11-24 Thread Vladimir Rusinov
Maybe, maybe not.

Have you tried installing '=postgresql93-contrib-9.3.14' ?

On Thu, Nov 24, 2016 at 3:41 PM David Richer 
wrote:

> Hi guys,
>
>
>
> I want to check my production server for the free space map issue.
> https://wiki.postgresql.org/wiki/Free_Space_Map_Problems
>
> I am on Centos 6 currently running 9.3.14 using pgdg repository.
>
>
>
> I need to install postgresql93-contrib to get the pg_freespacemap
> extension. Only postgresql93-contrib-9.3.15 package is available in pgdg
> repository. It will force me to upgrade my postgresql to 9.3.15 which will
> restart my production postgresql server which I am not yet ready to do, I
> want to know if we are affected by the free space map issue first.
>
>
>
> My question: Would it be safe to install postgresql93-contrib-9.3.15 and
> not upgrade my postgresql server? In other words, would an extension
> compiled with 9.3.14 will work with a postgresql 9.3.15 server?
>
>
>
> Thanks,
>
> Davud
>
>


smime.p7s
Description: S/MIME Cryptographic Signature