What is the pg_clog and the clog

There are several directories named log in a Postgres installation.

You have pg_xlog, pg_log and pg_clog.

These are all important but I’ll talk about the others another time.

Pg_clog is the commit log. It is generally a small folder that you should never have a reason to look at. (note that from version 10 of postgres the pg_clog directory is being renamed to pg_xact I will continue to refer to it as pg_clog in this document but the functioning of both is the same)

Importantly, you can never delete anything from that directory. If you do your database will become unusable and you will need to recreate it from a backup.

Continue reading “What is the pg_clog and the clog”

Oracle ASM Mirroring and Failure groups.

Oracle ASM keeps redundancy quite simple by providing only 3 options. you can choose to have no redundancy or mirroring provided by the ASM instance. This is the ‘External’ option and assumes that you are handling mirroring somewhere else perhaps through hardware raid on your storage network.

You can chose ‘normal’ 2 way mirroring r ‘High’ for 3 way mirroring.

This option is set for each disk group and can be different for every one.

Basically, the redundancy level determines how many disks you can afford to have fail before the disk group is dismounted or data loss occurs. With external mirroring, you can’t afford to lose any disks whereas with 3 way mirroring, you could lose 2 disks and there would still be one copy available.

With normal RAID, the level of mirroring is set for the disk (or disk group). ASM gives you a more granular level of control. For example, it is possible to set different mirroring levels for different files on a single disk group.

When data is created or an extent is allocated, ASM creates a primary copy and a mirrored copy. these copies are distributed across failure groups so that losing a failure group completely would not in and of itself cause the loss of any data.

You cannot change the redundancy levels of a disk group once it is created. If failure groups are not specified, ASM places each disk into its own failure group (unless the disk group contains Exadata cells.

 

 

Cleaning up a failed Oracle 11g grid infrastructure install.

Unfortunately, the installer or more specifically the root.sh script for the Oracle 11g grid (Clusterware) installer can be very flaky.

 

If it fails and you need to fix something or rerun it for any reason, it will fail the next time if you have not cleaned up the install by de-configuring CRS. I also like to wipe the installation off altogether and restart from a clean base. Here are the steps.

/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -verbose -force

/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -verbose -force -lastnode

At this point, you could rerun root.sh (after you have fixed the problem, but if you have closed the installer or just want to restart from a clean base then continue with the steps below.

 

Get the oracle home from the inventory then delete them both

 cat /etc/oraInst.loc

cd /u01/app/oraInventory/ContentsXML/

cat inventory.xml

Find the Oracle home

Remove it on all nodes

 rm -R /u01/app/11.2.0/

Also remove the inventory

rm -R /u01/app/oraInventory/

rm -R /etc/oracle

rm /etc/oraInst.loc

rm /etc/oratab

rm /usr/local/bin/dbhome

rm /usr/local/bin/oraenv

rm /usr/local/bin/coraenv

Then change the ownership of the /u01/app directory:

chown oracle:dba /u01/app

 

You could stop there but if you really want to wipe the slate, you could delete your ASM disks  and recreate them fresh before the next install.

 

Delete your ASM disks on node 1

 oracleasm deletedisk DISK1

oracleasm deletedisk DISK2

oracleasm deletedisk DISK3

oracleasm deletedisk DISK4

.

.

.

 

On all nodes

oracleasm scandisks

/usr/sbin/oracleasm exit

 

Now give your node a reboot and you should have a clean base from which to start another install.

 

Companies in “Boring” Niches Creating Great Content

If you are going to be online, and you need to produce content. it is as simple as that. One of the big problems that many non info based businesses online raise is that their topic is boring or that there is nothing to write about. This is almost always wrong. Take a look at how these businesses are tackling the problem creatively. http://www.seomoz.org/blog/companies-in-boring-niches-creating-great-content

Anatomy of a Successful PPC Ad

What are the factors that determine a PPC ads success or failure? What factors should you work on to improve your ads effectiveness? This article focuses on the fundamentals, not things like keyword selection or improving quality score, but the factors that make a really good ad that makes people buy or click. http://searchenginewatch.com/article/2183894/Anatomy-of-a-Successful-PPC-Ad