last time i finished with working smtp system, with accounts, aliases and quota. now, let's add ability to get th
e mails for client (imap/pop3) and some smtp-auth.
Continue reading smtp + sql = more than it seems so (part 5)
last time i finished with working smtp system, with accounts, aliases and quota. now, let's add ability to get th
e mails for client (imap/pop3) and some smtp-auth.
Continue reading smtp + sql = more than it seems so (part 5)
i will try to follow development of 8.4, and write examples of what's possible with it, based on current HEAD code.
of course there is no guarantee that it will work in final, released 8.4 (it is a bit too early to talk about it, but given the fact that the patch got committed, there is pretty good chance we will see it whenever 8.4 will be released.
today 2 new features: limit (select ) and optional as in select.
at the end of last part of this text, i finished having ready postgresql and exim (pop/imap installed but not configured), with exim being able to ask postgresql whether given domain is local. now, let the saga continue.
Continue reading smtp + sql = more than it seems so (part 3)
due to requests (in “real life", not on blog), i put my .vimrc in svn, to be easily accessible.
svn repo at: http://svn.depesz.com/svn/environment/.vim/main-rc.vim
for quite some time i wanted to write about my experiences with combining smtp server with sql server.
this subject for some people might be too boring, for others – it might be seen as a simple howto. but in my opinion it clearly shows that when you combine 2 such technologies outcome is much better then it would seem (it's called synergy in merketoid-speak).
this subject will be divided into several parts, that will be posted separately (yeah, let's get some traffic to website 🙂
also, i hope to extend it in future if/when i'll find something else that can be added/changed in proposed solution.
so, without further ado, let's start:
Continue reading smtp + sql = more than it seems so (part 1)
in most applications you have some variant of this table:
CREATE TABLE users ( id serial PRIMARY KEY, username TEXT NOT NULL, passwd TEXT );
and, usually, the passwd stores user password in clear text way.
this is usually not a problem, but in case you'd like to add password encryption in database, there are some ways to do it – and i'll show you which way i like most.
in postgresql 8.2, in contrib, is great new datatype called hstore.
if you're not familiar with it – check the docs.
in short – this is indexable associative-array (hash) in one field.
i was given a task to convert some text field to hstore field.
one of the more common problems new users have with postgresql (especially those that came from mysql background), is the lack of easy way to grant/revoke/do-something with many objects (tables/sequences/views) at once.
there are number of pages that deal with the problem, let's just name some from #postgresql infobots:
now, both of these pages have their benefits, but i'd like to show something simpler, yet (perhaps) more powerful.
instead of giving you the fish (figuratively speaking) i will give you the net and the skills so you'll be able to do the magic yourself.
UPDATE (2012-06-24): Version 9.1 of PostgreSQL renamed ident to peer (for local connections). So if you're having errors about “Peer authentication failed" – it is the same as “Ident authentication failed", and all described in this blogpost is still relevant.
ever seen one of those? i mean the “fatal: ident authentication failed"?
or, ever seen anyone having this problem when connecting to postgresql?
how often is this problem related to debian/post-debian linux distributions? 99%? 100%?
on #postgresql on irc.freenode.net it is the most common problem. my own irc logs show that “ident" showed over 300 times over last 41 days. now, that's something. and how come we have this problem? what can be done with it? read on.
Continue reading “FATAL: Ident authentication failed", or how cool ideas get bad usage schemas
just recently we got another array for out main production database. this means – we will be able to add new tablespace, thus making everything go faster.
in theory – it's nice. but which tables to move to the other?
the basic assumption is simple – index on table should not be on the same tablespace as the table itself. that's easy. but – should we really put all tables on one tablespace, and all indexes on another?
we decided that the important things that should be “boosted" are seeks and writes. sequential reads are (in our situation) more or less irrelevant.
read on to check how we split the load.
Continue reading finding optimum tables placement in 2-tablespace situation