Sunday, September 28, 2008

[NOVICE] absolute novice wanting knowledgeable opinion about front end

I created a few rather involved databases in msaccess along with saved queries,
reports and forms.

However, because of the intuitiveness of msaccess, I have secretaries who have
figured out how to create forms and reports as well and found Access's gui easy
to use. And I found their Basic quick and easy as well to help make more
involved forms.

I decided to look at mysql and postgresql, postgresql gives me more confidence
of utilizing my databases since I did fairly well normalizing its relational
structure.

How would I enable my secretaries to keep creating and modifying forms and
reports if I switch to an open source DB.

Is there anything out there that can match msaccess power in this graphical
highlevel programming ability.

Or should I look at mysql.

--
Phil


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

Re: [PATCHES] [HACKERS] Infrastructure changes for recovery

Simon Riggs <simon@2ndQuadrant.com> writes:
>> It does nothing AFAICS for the
>> problem that when restarting archive recovery from a restartpoint,
>> it's not clear when it is safe to start letting in backends. You need
>> to get past the highest LSN that has made it out to disk, and there is
>> no good way to know what that is.

> AFAICS when we set minRecoveryLoc we *never* unset it. It's recorded in
> the controlfile, so whenever we restart we can see that it has been set
> previously and now we are beyond it.

Right ...

> So if we crash during recovery and
> then restart *after* we reached minRecoveryLoc then we resume in safe
> mode almost immediately.

Wrong.

What minRecoveryLoc is is an upper bound for the LSNs that might be
on-disk in the filesystem backup that an archive recovery starts from.
(Defined as such, it never changes during a restartpoint crash/restart.)
Once you pass that, the on-disk state as modified by any dirty buffers
inside the recovery process represents a consistent database state.
However, the on-disk state alone is not guaranteed consistent. As you
flush some (not all) of your shared buffers you enter other
not-certainly-consistent on-disk states. If we crash in such a state,
we know how to use the last restartpoint plus WAL replay to recover to
another state in which disk + dirty buffers are consistent. However,
we reach such a state only when we have read WAL to beyond the highest
LSN that has reached disk --- and in recovery mode there is no clean
way to determine what that was.

Perhaps a solution is to make XLogFLush not be a no-op in recovery mode,
but have it scribble a highest-LSN somewhere on stable storage (maybe
scribble on pg_control itself, or maybe better someplace else). I'm
not totally sure about that. But I am sure that doing nothing will
be unreliable.

regards, tom lane

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

Re: [HACKERS] Ad-hoc table type?

Not that I'm agreeing with the direction but just as a thinking experiment:

Tom Lane wrote:
pgsql@mohawksoft.com writes:   
Being able to insert arbitrary named values, and extracting them similarly, IMHO works "better" and more naturally than some external aggregate system built on a column. I know it is a little "outside the box" thinking, what do you think?     
 I'm failing to see the point.  Allowing columns to spring into existence without any forethought seems to me to be all minuses and no pluses worth mentioning.  * What if the column name is just a typo?   

If it's a field in a data structure from a language such as Java, it's not a typo.

* What datatype should it have?  ("Always varchar" is just lame.)   

SQLite uses "always varchar" and it doesn't seem to be a problem. For simpler numbers like "0", the text form can be more compact, and the database may be portable across different hardware architectures.

* Should it have an index?  If so, should it be unique?   

It might be cool for indexes to automatically appear as they become beneficial (and removed as they become problematic). Unique is a constraint which should be considered separate from whether it should be an index or not. I don't know if it would be useful or not.

* If you keep doing this, you'll soon find yourself reading out unbelievably wide tables (lots of columns), which won't be especially easy or efficient to process on either the backend or the client side. Plus you might run into the max-columns-per-tuple limit.   

Introduce variable field-order for tuples? Only provide values if non-null? :-)

If you've expended enough thought to be sure that the column is not just a typo, ISTM that you can afford to enter an ALTER TABLE ADD COLUMN command to tell the database the results of your genius.  I do see the point that switching from "member of an hstore column" to "real database column" is pretty painful, but I don't see that "allow columns to spring into existence" solves that in any meaningful way. Is there some other way we could address such conversions?  BTW, I think it is (or should be) possible to create an index on hstore->'mycol', so at least one of the reasons why you should *need* to switch to a "real" database column seems bogus.   

I find the Oracle nested table and data structure support enticing although I do not have experience with it. It seems like it might be a more mature implementation of hstore? If hstore had everything that was required in terms of performance or flexibility, we wouldn't need fixed columns at all?

But yes - I tend to agree that the object persistent layer can be hidden away behind something like the Java object persistence model, automatically doing alter table or providing a configured mapping from a description file. This isn't a problem that needs to be solved at the database layer.

Cheers,
mark

--  Mark Mielke <mark@mielke.cc> 

Re: [PATCHES] [HACKERS] Infrastructure changes for recovery

On Sun, 2008-09-28 at 14:02 -0400, Tom Lane wrote:

> It does nothing AFAICS for the
> problem that when restarting archive recovery from a restartpoint,
> it's not clear when it is safe to start letting in backends. You need
> to get past the highest LSN that has made it out to disk, and there is
> no good way to know what that is.
>
> Unless we can get past this problem the whole thing seems a bit dead
> in
> the water :-(

I agree the importance of your a problem but don't fully understand the
circumstances under which you see a problem arising.

AFAICS when we set minRecoveryLoc we *never* unset it. It's recorded in
the controlfile, so whenever we restart we can see that it has been set
previously and now we are beyond it. So if we crash during recovery and
then restart *after* we reached minRecoveryLoc then we resume in safe
mode almost immediately. If we crash during recovery before we reached
minRecoveryLoc then we continue until we find it.

There is a loophole, as described on separate post, but that can be
plugged by offering explicit setting of the minRecoveryLoc from
recovery.conf. Most people use pg_start_backup() so do not experience
the need for that.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support


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

Re: [HACKERS] Ad-hoc table type?

pgsql@mohawksoft.com writes:
> Being able to insert arbitrary named values, and extracting them
> similarly, IMHO works "better" and more naturally than some external
> aggregate system built on a column. I know it is a little "outside the
> box" thinking, what do you think?

I'm failing to see the point. Allowing columns to spring into existence
without any forethought seems to me to be all minuses and no pluses
worth mentioning.

* What if the column name is just a typo?

* What datatype should it have? ("Always varchar" is just lame.)

* Should it have an index? If so, should it be unique?

* If you keep doing this, you'll soon find yourself reading out
unbelievably wide tables (lots of columns), which won't be especially
easy or efficient to process on either the backend or the client side.
Plus you might run into the max-columns-per-tuple limit.

If you've expended enough thought to be sure that the column is not just
a typo, ISTM that you can afford to enter an ALTER TABLE ADD COLUMN
command to tell the database the results of your genius.

I do see the point that switching from "member of an hstore column" to
"real database column" is pretty painful, but I don't see that "allow
columns to spring into existence" solves that in any meaningful way.
Is there some other way we could address such conversions?

BTW, I think it is (or should be) possible to create an index on
hstore->'mycol', so at least one of the reasons why you should *need*
to switch to a "real" database column seems bogus.

regards, tom lane

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

Re: [GENERAL] inserting to a multi-table view

On Tue, 17 Jun 2008 12:46:27 -0700,
"Richard Broersma" <richard.broersma@gmail.com> wrote:

> On Tue, Jun 17, 2008 at 12:34 PM, Michael Shulman <shulman@mathcamp.org> wrote:
>> Would it be possible to actually do something like this in an update
>> rule? You couldn't write the "begin/commit", but it seems that you
>> wouldn't need to either, since the UPDATE command invoking the rule
>> will be wrapped in its own begin/commit (automatic or explicit).

> Thats a good question. I've never tried it. and since then, I gotten
> away from using update-able view. In my case, I like using Natural
> Primary keys so update-able views wouldn't work for me any more. :o)

I've read this thread with great interest as I'm coming to PostgreSQL
from the MS Access world of databases, where one can enter new data into
queries/forms and tables get automatically updated/deleted/inserted into
where expected.

I'm also leaning towards using natural keys where possible and was
wondering how best to create multi-table views that can be
updated/deleted/inserted into. Therefore, any further insights
following the discussion above would be very helpful. Particularly, I'm
curious to learn how PostgreSQL database maintainers handle data
entry/modification requiring multi-table queries. Thanks.


--
Seb


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

Re: [HACKERS] Null row vs. row of nulls in plpgsql

Greg Stark <greg.stark@enterprisedb.com> writes:
> On 27 Sep 2008, at 09:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ISTM that the fundamental problem is that plpgsql doesn't distinguish
>> properly between a null row value (eg, "null::somerowtype") and a
>> row of null values (eg, "row(null,null,...)::somerowtype"). When that
>> code was designed, our main SQL engine was pretty fuzzy about the
>> difference too, but now there is a clear semantic distinction.

> Iirc the reason for this fuzziness came from the SQL spec definition
> of IS NULL for rows. As long as you maintain that level of spec-
> compliance I don't think there are any other important constraints on
> pg behaviour.

I started to poke into this and found out that it was a bit subtler than
I thought. It'd be possible to associate a "rowisnull" state value
with a row variable, but the problem is that plpgsql treats the row
fields as independent variables that can be accessed without touching
the row. In particular you can assign null or nonnull values to
individual fields. So consider

-- presumably, this'll set rowisnull to TRUE:
rowvar := NULL;
-- this had better cause rowisnull to become FALSE:
rowvar.field1 := 42;
-- does this cause it to become TRUE again?
rowvar.field1 := NULL;

There are a bunch of implementation problems with making any such
behavior happen, since the row field variables don't currently "know"
that they are members of a row, and indeed it's possible for the same
variable to be a member of more than one row. But the core issue is
that this interaction seems to fuzz the distinction between "row is
null" and "all the row's elements are null". In particular, if you
think that rowisnull should be TRUE after the above sequence, then
I think you are saying they are the same thing. So maybe the spec
authors are smarter than we are.

Thoughts? What would a consistent behavior look like?

regards, tom lane

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

Re: [HACKERS] Ad-hoc table type?

> pgsql@mohawksoft.com writes:
>> Something like this:
>
>> create adhoc table foo ();
>
>> insert into foo (name, rank, serial) values ('joe', 'sargent', '42');
>
>> In an "ad-hoc" table type, when an insert is made, and a column is not
>> found, then a new varchar column is added.
>
>> I know the idea has a lot of holes, and is probably a bad idea, but it
>> answers an important problem of easily mapping programmatic types to a
>> database.
>
> Seems like a table with one contrib/hstore column might be more relevant
> to this guy's idea of how to do database design.
>

That's actually a very cool module, I hadn't seen it before. I've
considered writing something like it, but more XML centric, but I'm not
sure it answers the concept.

I'm not sure if you have dealt with web site sessions and object
persistence crap, but its a pain to get up and running and improving
performance is a drag. Web guys tend to know very little about databases
and tend, sadly, not to be very inquisitive about such things.

Web session and user attribute objects are typically stored in a database
as XML, JSON, or some other aggregated format in a single column (hstore).
That works great for when you just need to access the data by the key, but
if you want to "use" the data outside the web application for something
like OLAP, you have to decide which attributes reside in the aggregate
column or get promoted to a full fledged column. That's why you'll see
tables with username, passwdhash, email, etc. in addition to an aggregated
column of things like screen template, age, etc.

So, how do you have a table of a generally arbitrary number of columns
without creating some sort of aggregate column? With an aggregate column,
the data isn't on the same level as real column data, so you need to parse
the aggregate to extract a value, and you have to do that for each value.
On top of that, you then have to explain your aggregate strategy to the
web guys.

Being able to insert arbitrary named values, and extracting them
similarly, IMHO works "better" and more naturally than some external
aggregate system built on a column. I know it is a little "outside the
box" thinking, what do you think?

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

Re: [HACKERS] Ad-hoc table type?

pgsql@mohawksoft.com writes:
> Something like this:

> create adhoc table foo ();

> insert into foo (name, rank, serial) values ('joe', 'sargent', '42');

> In an "ad-hoc" table type, when an insert is made, and a column is not
> found, then a new varchar column is added.

> I know the idea has a lot of holes, and is probably a bad idea, but it
> answers an important problem of easily mapping programmatic types to a
> database.

Seems like a table with one contrib/hstore column might be more relevant
to this guy's idea of how to do database design.

regards, tom lane

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

Re: [PERFORM] Slow updates, poor IO

Thanks to everyone that responded.
I've done some benchmarking

checkpoint _segments=16 is fine, going to 64 made no improvement.
Using "update file set size=99" as a statement, but changing 99 on each
run..

With 32M shared memory, time in sec and leaving the system idle long
enough between runs for auto vacuum to complete.

415
421
470

The I decided to drop the Db and restore from a dump

1150
1500
1018
1071
1077
1140

Then I tried shared_mem=256M as suggested.

593
544

So thats made a big difference. vmstat showed a higher, more consistent,
IO level

I wondered why it slowed down after a restore. I thought it would
improve, less fragmentation
and all that. So I tried a reindex on all three indexes.

209
228

So thats it! lots of ram and reindex as part of standard operation.

Interestingly, the reindexing took about 16s each. The update on the
table with no indexes took about 48sec
So the aggregate time for each step would be about 230s. I take that as
being an indicator that it is
now maximally efficient.


The option of having more spindles for improved IO request processing
isn't feasible in most cases.
With the requirement for redundancy, we end with a lot of them, needing
an external enclosure.
They would have to be expensive SCSI/SAS/FC drives too, since SATA just
don't have the IO processing.

It will be interesting to see what happens when good performing SSD's
appear.

Meanwhile RAM is cheaper than that drive array!

It would be nice if thing like
* The effect of updates on indexed tables
* Fill Factor
* reindex after restore

Were mentioned in the 'performance' section of the manual, since that's
the part someone will go
to when looking for a solution.


Again, thanks to everyone,

--John


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

[HACKERS] Ad-hoc table type?

I was in a discussion with someone about the difference between ad-hoc
storage systems and SQL. Yes, I know, I was rolling my eyes as well. One
thing did strike me though was the idea that a table could contain a
variable number of columns.

Something like this:

create adhoc table foo ();

insert into foo (name, rank, serial) values ('joe', 'sargent', '42');

In an "ad-hoc" table type, when an insert is made, and a column is not
found, then a new varchar column is added.

I know the idea has a lot of holes, and is probably a bad idea, but it
answers an important problem of easily mapping programmatic types to a
database.

Anyone think its interesting?


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

Re: [PERFORM] Slow updates, poor IO

Ahh! I've not dealt with that before. I'll look it up.
Thanks Tom.


Tom Lane wrote:
John Huttley <John@mib-infotech.co.nz> writes:   

You are thinking of HOT? I don't think it applies in the case of full table updates??     
 Sure, as long as there's enough free space on each page.  If you wanted to make a table that was optimized for this kind of thing, you could try creating it with fillfactor 50.  			regards, tom lane    

[COMMITTERS] pgsql: Dept of second thoughts: let's make sure that

Log Message:
-----------
Dept of second thoughts: let's make sure that get_index_stats_hook is only
applied to expression indexes, not to plain relations. The original coding
in btcostestimate conflated the two cases, but it's not hard to use
get_relation_stats_hook instead when we're looking to the underlying relation.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
selfuncs.c (r1.254 -> r1.255)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.254&r2=1.255)

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

Re: [PATCHES] [HACKERS] get_relation_stats_hook()

Simon Riggs <simon@2ndQuadrant.com> writes:
> New version of Postgres patch, v5. Implements suggested changes.
> Ready for review and apply.

Applied with some revisions. The method for passing back freefunc
didn't work, so I made it pass the whole VariableStatsData struct
instead; this might allow some additional flexibility by changing other
fields besides the intended statsTuple and freefunc. Also, I was still
unhappy about adding a hook in the midst of code that clearly needs
improvement, without making it possible for the hook to override the
adjacent broken code paths; so I refactored the API a bit for that too.

The plugin function would now be something like this:

static bool
plugin_get_relation_stats(PlannerInfo *root,
RangeTblEntry *rte,
AttrNumber attnum,
VariableStatData *vardata)
{
HeapTuple statstup = NULL;

/* For now, we only cover the simple-relation case */
if (rte->rtekind != RTE_RELATION || rte->inh)
return false;

if (!get_tom_stats_tupletable(rte->relid, attnum))
return false;

/*
* Get stats if present. We asked for only one row, so no need for loops.
*/
if (SPI_processed > 0)
statstup = SPI_copytuple(SPI_tuptable->vals[0]);

SPI_freetuptable(SPI_tuptable);
SPI_finish();

if (!statstup)
return false; /* should this happen? */

vardata->statsTuple = statstup;
/* define function to use when time to free the tuple */
vardata->freefunc = heap_freetuple;

return true;
}

and if you want to insert stats for expression indexes then there's a
separate get_index_stats_hook for that.

regards, tom lane

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

[COMMITTERS] pgsql: Add hooks to let plugins override the planner's lookups in

Log Message:
-----------
Add hooks to let plugins override the planner's lookups in pg_statistic.
Simon Riggs, with some editorialization by me.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
selfuncs.c (r1.253 -> r1.254)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.253&r2=1.254)
pgsql/src/backend/utils/cache:
lsyscache.c (r1.159 -> r1.160)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/lsyscache.c?r1=1.159&r2=1.160)
pgsql/src/include/utils:
lsyscache.h (r1.125 -> r1.126)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/lsyscache.h?r1=1.125&r2=1.126)
selfuncs.h (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/selfuncs.h?r1=1.46&r2=1.47)

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

Re: [pgsql-advocacy] Going to XLDB

On Saturday 27 September 2008 13:03, Oleg Bartunov wrote:
> It's interesting, but I contacted with XLDB people independently a week
> ago. We have astronomical DB about 6 TB size and in a 2-3 year expect
> 300-400 TB from our future telescope mounted on ISS.
> That's why I'm interested in joining XLDB development.

Yeah, they don't have any funds for attendee travel, though. That's why
I'm going; I can drive there.

Please forward to me any commentary you have for the meeting, and maybe
more detail about the astronomical DB.

--
--Josh

Josh Berkus
PostgreSQL
San Francisco

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

[austinpug] October meeting

The next meeting will be Oct. 7th, 7PM at Sun. Robert Lor will be
presenting on DTrace.

I won't be able to attend this meeting, you I leave it to everyone
who will be there to work out the details on pizza. I normally order
from the Mangia's on Gracy Farms; 3 larges, one spinach, one meat-
lover and one Chicago-style. 2 2-liters of Coke, one diet Coke and
one Sprite.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Re: [BUGS] ERROR: unexpected data beyond EOF in block XXXXX of relation "file"

That's going to be a problem for the continued viability of Postgres.
Clustered systems using a NAS for data is a pretty common configuration
these days. Oracle specifically supports it and even complains if your NFS
mount options are not correct. Our Oracle DBs run great in this same
configuration and are a good 10-20 times faster than the local disk
performance along with the quick take-over capability if a system goes belly
up.

I'll try to isolate this problem with a simple C program to tell me what
software layer to look at. Hopefully it's just a configuration issue.


Tom Lane-2 wrote:
>
> austijc <jaustin@jasononthe.net> writes:
>> The question is can anyone more familiar with this tell me what's going
>> on
>> here? I don't know if this is a Postgres, Sun, or NetApp issue. Could
>> it
>> be a work around for an old Linux bug causing an issue with acceptable
>> behavior of the NetApp device?
>
> People who try to run databases over NFS usually regret it eventually ;-)
>
> All I can say is that this error message has never before been reported
> by anyone who wasn't exposed to that lseek-inconsistency kernel bug.
> I am not finding it too hard to believe that NFS might be vulnerable to
> similar misbehavior.
>
> regards, tom lane
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>
>

--
View this message in context: http://www.nabble.com/ERROR%3A--unexpected-data-beyond-EOF-in-block-XXXXX-of-relation-%22file%22-tp19680438p19713228.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


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

Re: [HACKERS] Proposal: move column defaults into pg_attribute along with attacl

Markus,

* Markus Wanner (markus.wanner@programmfabrik.de) wrote:
> What does the subobject column for pg_shdepend buy us?

Tracking column-level ACL dependencies rather than having those
dependencies only be at the table-level. This complicates
pg_shdepend some, but simplifies the dependency handling in the
ACL area and in handling table/column drops.

I'm still not a fan of having column-level deps handled
differently between pg_shdepend and pg_depend, but that's not
something which has to be addressed directly by the column-level
privs patch. Perhaps once it's done I'll do a proof-of-concept
for removing pg_attdef.

Thanks,

Stephen

Re: [PATCHES] [HACKERS] Infrastructure changes for recovery

Simon Riggs <simon@2ndQuadrant.com> writes:
> On Thu, 2008-09-25 at 18:28 -0400, Tom Lane wrote:
>> After reading this for awhile, I realized that there is a rather
>> fundamental problem with it: it switches into "consistent recovery"
>> mode as soon as it's read WAL beyond ControlFile->minRecoveryPoint.
>> In a crash recovery situation that typically is before the last
>> checkpoint (if indeed it's not still zero), and what that means is
>> that this patch will activate the bgwriter and start letting in
>> backends instantaneously after a crash, long before we can have any
>> certainty that the DB state really is consistent.
>>
>> In a normal crash recovery situation this would be easily fixed by
>> simply not letting it go to "consistent recovery" state at all, but
>> what about recovery from a restartpoint? We don't want a slave that's
>> crashed once to never let backends in again. But I don't see how to
>> determine that we're far enough past the restartpoint to be consistent
>> again. In crash recovery we assume (without proof ;-)) that we're
>> consistent once we reach the end of valid-looking WAL, but that rule
>> doesn't help for a slave that's following a continuing WAL sequence.
>>
>> Perhaps something could be done based on noting when we have to pull in
>> a WAL segment from the recovery_command, but it sounds like a pretty
>> fragile assumption.

> Seems like we just say we only signal the postmaster if
> InArchiveRecovery. Archive recovery from a restartpoint is still archive
> recovery, so this shouldn't be a problem in the way you mention. The
> presence of recovery.conf overrides all other cases.

What that implements is my comment that we don't have to let anyone in
at all during a plain crash recovery. It does nothing AFAICS for the
problem that when restarting archive recovery from a restartpoint,
it's not clear when it is safe to start letting in backends. You need
to get past the highest LSN that has made it out to disk, and there is
no good way to know what that is.

Unless we can get past this problem the whole thing seems a bit dead in
the water :-(

>> * I'm a bit uncomfortable with the fact that the
>> IsRecoveryProcessingMode flag is read and written with no lock.

> It's not a dynamic state, so I can fix that inside
> IsRecoveryProcessingMode() with a local state to make check faster.

Erm, this code doesn't look like it can allow IsRecoveryProcessingMode
to become locally true in the first place? I guess you could fix it
by initializing IsRecoveryProcessingMode to true, but that seems likely
to break other places. Maybe better is to have an additional local
state variable showing whether the flag has ever been fetched from
shared memory.

The other issues don't seem worth arguing about ...

regards, tom lane

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

Re: [GENERAL] Can anyone explain?

"Abraham, Danny" <danny_abraham@bmc.com> writes:
> set standard_conforming_strings=on;
> select 'abcd\efg' like 'abcd\efg' ==> F (I expected it to be T)
> select 'abcd\efg' like 'abcd\\efg' ==> T (I expected it to be F)

Backslash is the default LIKE escape character.

regards, tom lane

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

Re: [HACKERS] FSM rewrite: doc changes

Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> To keep everyone who's interested up-to-date, attached is the latest
> patch. ...
> I find it a bit disturbing that a documentation patch actually removes
> more lines from the manual than adds, but it's quite understandable
> because it's no longer necessary to explain the two GUC options that
> used to be quite important :-). Comments welcome.

Well, this patch isn't actually supposed to have user-visible impact
other than eliminating a couple of troublesome configuration settings.
So it's entirely expected for the docs to get shorter ;-)

I did another pass of code-reading, and found a lot of nitpicks and
some not-so-trivial issues. In no particular order:


Copyright in indexfsm.c is a year off.

InitIndexFreeSpaceMap should have a comment

The comment for RecordFreeIndexPage gives the function's name incorrectly.

InitFreeSpaceMap() should be explicitly declared as taking void in its
definition.

FreeSpaceMapTruncateRel seems to have a bug in its early-exit test: in the
case where the number of FSM blocks stays the same, it fails to zero out slots
in the last block. I also think it's got an off-by-one problem in figuring
the number of FSM blocks: for the normal case where the new heap end is in
the middle of a FSM block, shouldn't new_nfsmblocks be one larger than it
is? The case where nblocks is an exact multiple of SlotsPerFSMPage would
need to be special-cased to be exactly correct, though I see no real harm in
letting the FSM be left one page too big in that case.

The patch shouldn't be touching bufmgr.c at all any more --- or at least, none
of the diffs there are improvements.

Docs for contrib/pageinspect still need work: the 3-parameter form of
get_raw_page isn't documented, nor the fork behavior of the 2-parameter form.

In gistvacuum.c, you've removed the code that adjusts totFreePages to not
count pages truncated away. I think you could just subtract the number of
truncated pages from it, since they must have been counted in it earlier.
(ginvacuum.c seems to get this right.)

I do not like the kluge in heap_xlog_clean one bit, and think it's unnecessary
anyway since we are not relying on the FSM to be accurate. Suggest reverting
the heapam.c changes except for heap_sync().

rd_fsm_nblocks_cache should be reset in the places where rd_targblock is.
You seem to have tracked the clearings of rd_smgr which is not the right
thing at all.

I see you renamed "next", which is good, but the README isn't up to speed on
it and a lot of the comments aren't either.

Since fp_next_slot is signed, the sanity check in fsm_search_avail had better
include "target < 0".

The new search algorithm in fsm_search_avail still doesn't work. Consider
what happens when the target is the rightmost slot on the page; it certainly
won't wrap properly.

fsm_truncate_avail seems quite broken: it's clearing the whole page always.

In fsm_rebuild_page, surely we needn't check "if (lchild < NodesPerPage)".
Also you probably ought to make it
if (fsmpage->fp_nodes[nodeno] != newvalue)
{
fsmpage->fp_nodes[nodeno] = newvalue;
changed = true;
}
to avoid useless write traffic into a shared buffer.

I think DEPTH should be a macro not a static int; it's certainly
reducible to a compile-time constant. Also I wonder whether you
really need the SlotsPerFSMPagePowers[] array at all (and if not,
you could get rid of InitFreeSpaceMap). It's used in only one
place and it seems a bit hard to argue that a multiplication loop
really needs to be avoided there --- the division loop that comes
after it will cost a lot more, and in any case both are negligible
compared to the shared buffer fetch that's about to occur.

This test in fsm_space_needed_to_cat:
if (needed >= (FSM_CATEGORIES - 1) * FSM_CAT_STEP)
elog(ERROR, "invalid FSM request size");
reveals a rather fundamental problem: it is clearly possible
for this test to fail on valid request sizes, because the page
header overhead is less than FSM_CAT_STEP (especially if BLCKSZ
is more than 8K). I'm not sure about a really clean solution
here. We could offset the needed_to_cat and avail_to_cat
calculations so that category 255 corresponds exactly to the
maximum possible free space, but that requires assuming that FSM
knows exactly what that is, which is a bit unpleasant. Thoughts?

It seems a bit schizophrenic that fsm_search_avail takes a Buffer
when all the other functions in fsmpage.c take Page arguments.
I see why fsm_search_avail needs to do that, but maybe it'd be
better if the other functions did too?

fsm_search() should not take addr as an argument, since it has a
built-in assumption that it is started at the root.

I find the use of eof as both a local variable and a parameter in
fsm_vacuum_page to be pretty poor programming practice. Maybe call
the parameter eof_p?

Shouldn't fsm_redo include a FreeFakeRelcacheEntry call?

regards, tom lane

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

Re: [pgsql-advocacy] Re: [pgeu-general] European PostgreSQL Day 2008's schedule has been published

Oleg Bartunov wrote:
> On Sat, 27 Sep 2008, Gabriele Bartolini wrote:
>
>> Ciao!
>>
>> I'm pleased to announce that the schedule for the European PGDay 2008
>> conference has now been published. Over the course of the two day
>> conference, there are 28 sessions planned covering a wide range of
>> topics in both English and Italian.
>>
>> For complete details of the schedule, please see
>> http://www.pgday.org/en/schedule .
>
> Is't possible to know, who is going to present talks. I don't see
> any names. Particularly, I'm interested in two GiST related talks.
> Probably, I can provide some help to authors.

See http://www.pgday.org/en/presentations.

We'll be merging that info into the schedule as well as Gabriele said,
but all talks are listed at that page. I think there is a simliar page
for the italian talks, but I don't know the language well enough to
point you there.

//Magnus

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

Re: [PERFORM] Slow updates, poor IO

I have had great success using FILLFACTOR on certain tables where big updates like this occur and improving performance.  It is still not as fast as I would like, but there are significant gains.  A big disk array won't help you as much as it should -- yes it will be faster, but it will still be chugging during one of these sorts of large updates and very inefficiently at that.

On some of my cases, a FILLFACTOR of 95 or 98 is enough to do the trick.  On others, 80 or 70 works.
It depends on the size of your rows versus the size of the modifications you make.  A fillfactor of 99 holds between ~80 bytes and one row-width worth of free space in every page, and is all that is needed if you have larger rows and only modify small fields such as ints.  I'm not sure why FILLFACTOR = 99 isn't the default, to be honest.  The size difference on disk is far less than 1% since most tables can't fit an exact number of rows in one page, and the benefit for updates is huge in certain cases.
On the other hand, your table has a narrow row width and will fit many rows on one page, and if you are modifying text or varchars, you may need more space for those reserved in the fillfactor void and a smaller FILLFACTOR setting on the table, down to about 50 for updates where the updated rows account for a big fraction of the row width.

A second benefit of using a fillfactor is that you can CLUSTER on an index and the table will retain that ordering for longer while inserts/updates/deletes occur.  A fillfactor setting, REINDEX, then CLUSTER sequence can have a big impact.


On Sun, Sep 28, 2008 at 7:33 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
John Huttley <John@mib-infotech.co.nz> writes:
> Scott Marlowe wrote:
>> was...  was a part of the trade-offs.

> You are thinking of HOT?
> I don't think it applies in the case of full table updates??


Re: [GENERAL] pg_start_backup() takes too long

On Sun, 2008-09-28 at 08:35 -0700, Joshua D. Drake wrote:
> Ivan Zolotukhin wrote:
> > Hello,
> >
> > Nothing bad both in system and postgres logs :( No serious activity
> > during backup. I've had to change statement_timeout for backup user to
> > make it work. But I cannot reproduce this case unfortunately.
>
> This is actually not uncommon and PostgreSQL shows exactly nothing in
> terms of why it is taking so long. The only assumption I have come up
> with is that start_backup does cause a checkpoint.

Yes, it does a normal checkpoint and writes a file. No reason for it to
take longer than any other checkpoint.

At 8.2 and below checkpoints were frequently delayed on busy systems.
This was because of lwlock starvation during commit phase of
transactions. That was fixed in 8.3.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support


--
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] pg_start_backup() takes too long

Ivan Zolotukhin wrote:
> Hello,
>
> Nothing bad both in system and postgres logs :( No serious activity
> during backup. I've had to change statement_timeout for backup user to
> make it work. But I cannot reproduce this case unfortunately.

This is actually not uncommon and PostgreSQL shows exactly nothing in
terms of why it is taking so long. The only assumption I have come up
with is that start_backup does cause a checkpoint.

Sincerely,

Joshua D. Drake

--
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] pg_start_backup() takes too long

Hello,

Nothing bad both in system and postgres logs :( No serious activity
during backup. I've had to change statement_timeout for backup user to
make it work. But I cannot reproduce this case unfortunately.

Regards,
Ivan

On Tue, Sep 23, 2008 at 6:18 AM, Bruce Momjian <bruce@momjian.us> wrote:
> Ivan Zolotukhin wrote:
>> Hello,
>>
>> What is the reason for
>>
>> select pg_start_backup('label');
>>
>> taking 10 minutes on not so loaded system even right after manual checkpoint?
>
> No idea; something is seriously wrong if that is happening. Do the
> database server logs or kernel logs show anything unusual?
>
> --
> Bruce Momjian <bruce@momjian.us> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + If your life is a hard drive, Christ can be your backup. +
>

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

[GENERAL] Can anyone explain?

set standard_conforming_strings=on;

select 'abcd\efg' like 'abcd\efg' ==> F (I expected it to be T)

select 'abcd\efg' like 'abcd\\efg' ==> T (I expected it to be F)

Thanks

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham@bmc.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: [PERFORM] Slow updates, poor IO

John Huttley <John@mib-infotech.co.nz> writes:
> Scott Marlowe wrote:
>> was... was a part of the trade-offs.

> You are thinking of HOT?
> I don't think it applies in the case of full table updates??

Sure, as long as there's enough free space on each page.

If you wanted to make a table that was optimized for this kind of thing,
you could try creating it with fillfactor 50.

regards, tom lane

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

Re: [GENERAL] subquery in FROM must have an alias

On Sun, 28 Sep 2008, Ashutosh Chauhan wrote:

> Hi all,
>
> This has been asked before and answered as well.
> http://archives.postgresql.org/pgsql-sql/2007-12/msg00002.php but I
> still cant figure out why postgres throws this error message even when
> I have provided the aliases. My query:
>
> select a,b
> from (billing.item JOIN (
> select *
> from ( billing.invoice JOIN billing.customer
> on (id_customer_shipped = customer_uid and
> address = 'pgh' ))
> as temp2 ))
> as temp;
>
> I have two from clauses so I have provided two corresponding alias
> names for those two from clauses.

If you break the above down a bit, you have:

select a,b
from
(
billing.item join
(select * from
(
billing.invoice join
billing.customer
on (id_customer_shipped = customer_uid and address='pgh')
)
as temp2
)
)
as temp;

What the system is complaining about is the subselect (select * from ... )
not having an alias. You've aliased the billing.invoice join
billing.customer one and (billing.item join (...)) one, but not the
subselect. In fact, I believe the two aliases you're using aren't strictly
necessary. Also, the above appears to be missing the condition for the
outermost join.

Maybe something like the following will work with a filled in on
condition:

select a,b
from
(
billing.item join
(select * from
(
billing.invoice join
billing.customer
on (id_customer_shipped = customer_uid and address='pgh')
)
)
as temp
on (...)
)

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

[pgsql-www] old releases in main file browser

Hi,

Why do we still have 7.3.x in the main page of file browser
(http://www.postgresql.org/ftp/source/)?
having it in there, is not encourage its usage? at least, it seems
against the declaration that community no longer support it.

--
regards,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

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

Re: [HACKERS] Null row vs. row of nulls in plpgsql

On Sun, 2008-09-28 at 04:03 +0300, Greg Stark wrote:
> Iirc the reason for this fuzziness came from the SQL spec definition
> of IS NULL for rows. As long as you maintain that level of spec-
> compliance I don't think there are any other important constraints on
> pg behaviour.

What does SQL spec say about recursive IS NULL for rows ?

Should we check that IS NULL is true for each row element, or must they
actually be NULL's ?

hannu=# select row(null, null) is NULL;
?column?
----------
t
(1 row)

hannu=# select row(null, row(null, null)) is NULL;
?column?
----------
f
(1 row)

--------------
Hannu

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

Re: [GENERAL] subquery in FROM must have an alias

On Sun, Sep 28, 2008 at 12:52:56AM -0400, Ashutosh Chauhan wrote:
> select a,b
> from (billing.item JOIN (
> select *
> from ( billing.invoice JOIN billing.customer
> on (id_customer_shipped = customer_uid and
> address = 'pgh' ))
> as temp2 ))
> as temp;

change last 2 lines to:
as temp2 )
as temp);

best regards,

depesz


--
Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/
jid/gtalk
: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

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

Re: [pgsql-www] [HACKERS] planned maintenance downtime - tribble.postgresql.org

Stefan Kaltenbrunner wrote:
> The sysadmin team would like to announce a planned maintenance window
> for OS related updates on tribble.postgresql.org starting Sunday Sep 28
> 07:00 GMT (espected to last for an hour) affecting the following
> publically visible services:
>
> cvs.postgresql.org
> wwwmaster.postgresql.org
> www.pgadmin.org
> doxygen.postgresql.org
> wiki.postgresql.org
>
> I would ask people to hold off on any changes or commits to the affected
> services during that time period until you see an explicit "it's done".

all done and services should be up again - if you notice any problems
please report back.


Stefan

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

Re: [pgeu-general] European PostgreSQL Day 2008's schedule has been published

Ciao Oleg,

Oleg Bartunov ha scritto:
> Is't possible to know, who is going to present talks. I don't see
> any names. Particularly, I'm interested in two GiST related talks.

We will update the websites in the next couple of days.

> Probably, I can provide some help to authors.

I have been told by members of the Italian CFP committee that you have
been privately informed already. :)

Thanks,
Gabriele

--
Gabriele Bartolini - Responsabile logistica PostgreSQL Day 2008
gabriele.bartolini@pgday.org - www.pgday.org - www.postgresql.org
Associazione Culturale Italian PostgreSQL Users Group - www.itpug.org
"PostgreSQL, the world's most advanced open-source database"

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

Re: [HACKERS] [REVIEW] Prototype: In-place upgrade v02

Hi,

I have gone through the following stuff

1) previous emails on the patch
2) http://wiki.postgresql.org/wiki/In-place_upgrade
3) http://www.pgcon.org/2008/schedule/attachments/57_pg_upgrade_2008.pdf
4) http://wiki.postgresql.org/wiki/In-place_upgrade:Storage

Here is what I have understood so far, (correct me if I am wrong)

The on disk representation of data has changed from version to version
over the years. For some strange reason (performance may be) the newer
versions of pg were not backwards compatible, meaning that the newer
version would not read data written by an older version if the on disk
representation has changed in between.
The end user would be required to port the data stored using older
version to the newer version format using offline import export.
This project aims upgrades from older to newer version on the fly.
On-disk representation is not the only change that the system should
accommodate, it should also accommodate catalog changes, conf file
changes etc.

Of the available design choices I think you have chosen to go with
on-line data conversion, meaning that pg would now be aware of all the
previous page layouts and based on a switch on page version would handle
each page layout. This will only be done to read old data, newer data
will be written in newer format.

I am supposed to test the patch and for that I have downloaded pg
versions 7.4, 8.0, 8.1, 8.2 and 8.3.

I plan to create a data directory using each of the versions and then
try to read the same using the 8.4 with your patch applied.

What database objects should I create in the test database, should I
just create objects of my choice?

Does sizes (both length and breadth) of tables matter?

Do I have to perform performance tests too?

Regards
Abbas


On Fri, 2008-09-19 at 14:28 +0200, Zdenek Kotala wrote:
> thanks
>
> Abbas napsal(a):
> > Even with that a hunk failed for bufpage.c, but I applied that part
> > manually to move on.
> > Regards
> > Abbas
> >
> > On Thu, 2008-09-18 at 12:17 +0200, Zdenek Kotala wrote:
> >> Abbas napsal(a):
> >>> Hi,
> >>> I downloaded latest postgresql source code from
> >>> git clone git://git.postgresql.org/git/postgresql.git
> >>> and tried to apply the patch
> >>> http://archives.postgresql.org/pgsql-hackers/2008-09/gza1fGXLvf3L.gz
> >>>
> >>> It does not apply cleanly, see the failures in attached file.
> >> It clash with hash index patch which was committed four days ago. Try to use
> >> little bit older revision from git (without hash index modification).
> >>
> >> Zdenek
> >>
> >>
> >>
> >
>
>


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

Saturday, September 27, 2008

[GENERAL] subquery in FROM must have an alias

Hi all,

This has been asked before and answered as well.
http://archives.postgresql.org/pgsql-sql/2007-12/msg00002.php but I
still cant figure out why postgres throws this error message even when
I have provided the aliases. My query:

select a,b
from (billing.item JOIN (
select *
from ( billing.invoice JOIN billing.customer
on (id_customer_shipped = customer_uid and
address = 'pgh' ))
as temp2 ))
as temp;

I have two from clauses so I have provided two corresponding alias
names for those two from clauses. But, still I get the error message

ERROR: subquery in FROM must have an alias
HINT: For example, FROM (SELECT ...) [AS] foo.

Any help on this will be greatly appreciated. I am using version 8.3.3
running on ubuntu.

Thanks,
Ashutosh

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

[COMMITTERS] npgsql - Npgsql2: Quote uuid constants when used in expression.

Log Message:
-----------
Quote uuid constants when used in expression. Thanks to Yann Robin for the fix.

Modified Files:
--------------
Npgsql2/src/Npgsql/SqlGenerators:
VisitedExpression.cs (r1.9 -> r1.10)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/npgsql/Npgsql2/src/Npgsql/SqlGenerators/VisitedExpression.cs.diff?r1=1.9&r2=1.10)

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

Re: [HACKERS] Null row vs. row of nulls in plpgsql

Iirc the reason for this fuzziness came from the SQL spec definition
of IS NULL for rows. As long as you maintain that level of spec-
compliance I don't think there are any other important constraints on
pg behaviour.

greg

--sorry for the top posting but the phone makes it hard to do anything
else.

On 27 Sep 2008, at 09:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I looked a bit at the bug report here:
> http://archives.postgresql.org/pgsql-bugs/2008-09/msg00164.php
>
> ISTM that the fundamental problem is that plpgsql doesn't distinguish
> properly between a null row value (eg, "null::somerowtype") and a
> row of null values (eg, "row(null,null,...)::somerowtype"). When that
> code was designed, our main SQL engine was pretty fuzzy about the
> difference too, but now there is a clear semantic distinction.
>
> For plpgsql's RECORD variables this doesn't seem hard to fix: just
> take out the code in exec_move_row() that manufactures a row of nulls
> when the input is null, and maybe make a few small adjustments
> elsewhere. For ROW variables there's a bigger problem, because those
> are represented by a list of per-field variables, which doesn't
> immediately offer any way to represent overall nullness. I think it
> could be dealt with by adding an explicit "the row as a whole is null"
> flag to struct PLpgSQL_row. I haven't tried to code it though, so I'm
> not sure if there are gotchas or unreasonably large code changes
> needed
> to make it happen.
>
> I thought for a little bit about whether we couldn't get rid of ROW
> variables entirely, or at least make them work more like RECORD
> variables
> by storing a HeapTuple instead of a list of per-field variables. But
> I soon found out that the reason to have them is to be able to
> describe
> the assignment target of SQL statements that assign to multiple scalar
> variables, eg "SELECT ... INTO x,y,z".
>
> Comments?
>
> regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

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

[GENERAL] GISVM - FOSS4G 2008 Special Edition

Dear all,

I am proud to announce the "GIS Virtual Machine" FOSS4G 2008 Special Edition, available at: http://www.gisvm.com

This full-feature GIS Workstation, based exclusively on free GIS software, now also includes "Kosmo 1.2" and the "uDIG 1.1" Sanity Check release. The one that will be used on uDIG Lab presentation at Cape Town!!!

Please feel free to download it and enjoy!!!

Regards,
--
Ricardo Pinho

PS.
These are the GISVM specs:

GISVM - FOSS4G 2008 Special Edition
Free and ready to use anywhere GIS Virtual Machine Workstation.
A FOSS4G 2008 Special Edition!

________________________________

Features
VMware info
- CPUs : 1
- RAM : 512 MB
- Networking : NAT
- Harddisk : 8 GB SCSI (expanding)
- VMware tools : Installed
- Sound card : Enabled
- USB : Enabled
OS info
- OS : Ubuntu 8.04 Desktop
- Installation : Standard
- Hostname : gisvm
- Patches : till date of creation
- IPv4 address : dhcp
- IPv6 address : dhcp
- DNS name : none
- Nameserver : dhcp
- Route : dhcp
- Root password: not set (use sudo to execute commands as root)
- User login : user
- User password: user
- Keyboard : US-intl
- Date created : 18-09-2008

GIS DESKTOP APPLICATIONS AVAILABLE
- Quantum GIS 0.11.0 Metis + GRASS
- gvSIG 1.2
- FWTools 2.0.6 (Open EV, GDAL/OGR, Proj.4, OGDI, Mapserver, Python)
- (NEW!!!) uDIG 1.1 SC 2 as presented at FOSS4G 2008
- (NEW!!!) Kosmo 1.2, an excellent Arcview clone

GIS SERVER APPLICATIONS AVAILABLE

PostgreSQL 8.3 + PostGIS 1.3.3-1 + pgAdminIII
- Database : postgis
- Login : postgres
- Password : postgres

JAVA 6 JDK + TOMCAT 6.0.18
- Port Number : 8080
- Manager login: admin
- Password : admin

GeoSERVER 1.7.0 RC1
- Login : admin
- Password : geoserver

Apache 2 + PHP 5.2.4 + Mapserver 5.1 + PHP Mapscript
- CGI-BIN : http://localhost/cgi-bin/mapserv
- WWW Root : /var/www/

General purpose applications available:
- OpenOffice2.4: Writer, Calc, Impress, Draw
- Internet : Firefox, Evolution Mail, Ekiga Softphone, Transmission Bit Torrent Client
- Graphics : F-Spot Photo Manager, GIMP Image Editor, XSane Image Scanner
- Sound & Video: Audio CD Extractor, Brasero Disc Burning, Movie Player, Rhythmbox Music Player, Sound Recorder
And thats all!

Problems and feedback: http://www.gisvm.com/forum
Keep informed on: http://www.gisvm.com/blog
Brought to you by Ricardo Pinho (http://www.gisvm.com)
Based on the ubuntu804desktop by Chrysaor (http://chrysaor.info)


______________________________

Technical Specifications
Operating System:
Ubuntu 8.04 Hardy
VMware Tools installed: Yes
Size: 1000MB
Allocated Memory (RAM): 512
Torrent Available

Applications Installed:

GIS DESKTOP APPLICATIONS
- Quantum GIS 0.11.0 Metis + GRASS
- gvSIG 1.2
- FWTools 2.0.6 (Open EV, GDAL/OGR, Proj.4, OGDI, Mapserver, Python)
- (NEW!!!) uDIG 1.1 S.C. 2
- (NEW!!!) Kosmo 1.2

GIS SERVER APPLICATIONS
- PostgreSQL 8.3 + PostGIS 1.3.3-1 + pgAdminIII
- JAVA 6 JDK + TOMCAT 6.0.18
- GeoSERVER 1.7.0 RC1
- Apache 2 + PHP 5.2.4 + Mapserver 5.1 + PHP Mapscript

GENERAL PURPOSE APPLICATIONS
- OpenOffice2.4: Writer, Calc, Impress, Draw
- Internet : Firefox, Evolution Mail, Ekiga Softphone, Transmission Bit Torrent Client
- Graphics : F-Spot Photo Manager, GIMP Image Editor, XSane Image Scanner
- Sound & Video: Audio CD Extractor, Brasero Disc Burning, Movie Player, Rhythmbox Music Player, Sound Recorder


Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses

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

Re: [PERFORM] Slow updates, poor IO

On Sat, Sep 27, 2008 at 4:33 PM, John Huttley <John@mib-infotech.co.nz> wrote:
>
> > > this is part of the trade-offs of MVCC.
>
> > was... was a part of the trade-offs.
>
> You are thinking of HOT?
> I don't think it applies in the case of full table updates??

Sure, you just need a table with plenty of empty space in it, either
from vacuumed previous deletes / inserts or with a low fill factor
like 50%.

> It's really an effect of parallel updates / writes / accesses, and is
> always an issue for a database running on a poor storage subsystem. A
> db with a two drive mirror set is always going to be at a disadvantage
> to one running on a dozen or so drives in a RAID-10
>
> Oh well, I'm forever going to be disadvantaged.

Why? A decent caching raid controller and a set of 4 to 8 SATA drives
can make a world of difference and the cost is not that high for the
gain in performance. Even going to 4 drives in a software RAID-10 can
make a lot of difference in these situations, and that can be done
with spare machines and hard drives.

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

Re: [PERFORM] Slow updates, poor IO



Scott Marlowe wrote:
On Fri, Sep 26, 2008 at 5:03 PM, John Huttley <John@mib-infotech.co.nz> wrote:   
Hi Andrew, There are two problems. The first is the that if there is a table with a index and an update is performed on a non indexed field, the index is still re indexed.     
 I assume you mean updated, not reindexed, as reindexed has a different meaning as regards postgresql.  Also, this is no longer true as of version 8.3.  If you're updating non-indexed fields a lot and you're not running 8.3 you are doing yourself a huge disservice.    

Yes sorry, I mean all indexes are updated even when the updated field is not indexed.
I'm running 8.3.3
   
this is part of the trade-offs of MVCC.     
 was...  was a part of the trade-offs.    
You are thinking of HOT?
I don't think it applies in the case of full table updates??

   
We should reasonably expect that the total amount of IO will go up, over a non-indexed table.  The second thing is that the disk IO throughput goes way down.  This is not an issue with MVCC, as such, except that it exposes the effect of a write to an indexed field.     
 It's really an effect of parallel updates / writes / accesses, and is always an issue for a database running on a poor storage subsystem.  A db with a two drive mirror set is always going to be at a disadvantage to one running on a dozen or so drives in a RAID-10    
Oh well, I'm forever going to be disadvantaged.


Re: [HACKERS] Null row vs. row of nulls in plpgsql

On Sat, 2008-09-27 at 14:56 -0400, Tom Lane wrote:
> I looked a bit at the bug report here:
> http://archives.postgresql.org/pgsql-bugs/2008-09/msg00164.php
>
> ISTM that the fundamental problem is that plpgsql doesn't distinguish
> properly between a null row value (eg, "null::somerowtype") and a
> row of null values (eg, "row(null,null,...)::somerowtype"). When that
> code was designed, our main SQL engine was pretty fuzzy about the
> difference too, but now there is a clear semantic distinction.
>
> For plpgsql's RECORD variables this doesn't seem hard to fix: just
> take out the code in exec_move_row() that manufactures a row of nulls
> when the input is null, and maybe make a few small adjustments
> elsewhere. For ROW variables there's a bigger problem, because those
> are represented by a list of per-field variables, which doesn't
> immediately offer any way to represent overall nullness. I think it
> could be dealt with by adding an explicit "the row as a whole is null"
> flag to struct PLpgSQL_row. I haven't tried to code it though, so I'm
> not sure if there are gotchas or unreasonably large code changes needed
> to make it happen.
>
> I thought for a little bit about whether we couldn't get rid of ROW
> variables entirely, or at least make them work more like RECORD variables
> by storing a HeapTuple instead of a list of per-field variables. But
> I soon found out that the reason to have them is to be able to describe
> the assignment target of SQL statements that assign to multiple scalar
> variables, eg "SELECT ... INTO x,y,z".

How hard would it be to have a RECORD that has pointers to those
multiple scalar variables ?

Referring again to my favorite ordinary programming language python, you
can have a very elegant way of assigning a "record" (a tuple in
pythonese) to a set of variables and vice versa

>>> rec = 1,2,3
>>> rec
(1, 2, 3)
>>> a,b,c = rec
>>> a
1
>>> c
3
>>> c,b,a
(3, 2, 1)

In other words, tuples are more or less automatically composed and
decomposed on demand.

I have not yet looked how hard the implementation of this would be for
postgreSQL, but at least the concept should be applicable.

----------------
Hannu

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

Re: [pgeu-general] European PostgreSQL Day 2008's schedule has been published

On Sat, 27 Sep 2008, Gabriele Bartolini wrote:

> Ciao!
>
> I'm pleased to announce that the schedule for the European PGDay 2008
> conference has now been published. Over the course of the two day
> conference, there are 28 sessions planned covering a wide range of
> topics in both English and Italian.
>
> For complete details of the schedule, please see
> http://www.pgday.org/en/schedule .

Is't possible to know, who is going to present talks. I don't see
any names. Particularly, I'm interested in two GiST related talks.
Probably, I can provide some help to authors.


>
> PGDay 2008 is a free PostgreSQL conference being held in Prato,
> Tuscany, Italy on October the 17th and 18th. For more details, please
> see the website: http://www.pgday.org/ .
>
> Registration for the conference is free, however places are limited
> for safety reasons. To avoid disappointment, please register as soon as
> possible at http://register.pgday.org/ .
>
> Thanks,
> Gabriele
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

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

Re: [pgsql-advocacy] Going to XLDB

It's interesting, but I contacted with XLDB people independently a week ago.
We have astronomical DB about 6 TB size and in a 2-3 year expect
300-400 TB from our future telescope mounted on ISS.
That's why I'm interested in joining XLDB development.

Oleg
On Fri, 26 Sep 2008, Josh Berkus wrote:

> Folks,
>
> I'm attending Stanford's XLDB[1] (eXtremely Large Databases) conference as
> the PostgreSQL representative for the first time. This will be cool.
>
> Send me any huge PostgreSQL data warehouse war stories which you have.
>
> [1]http://www-conf.slac.stanford.edu/xldb08/
>
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

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

[HACKERS] Fwd: Null row vs. row of nulls in plpgsql



---------- Forwarded message ----------
From: Oleg Serov <serovov@gmail.com>
Date: 2008/9/27
Subject: Re: Null row vs. row of nulls in plpgsql
To: Tom Lane <tgl@sss.pgh.pa.us>


I'm newbie, but i think that adding bool flag to PLpgSQL_row isnull will handle the problem(like in PLpgSQL_var);

2008/9/27 Tom Lane <tgl@sss.pgh.pa.us>

I looked a bit at the bug report here:
http://archives.postgresql.org/pgsql-bugs/2008-09/msg00164.php

ISTM that the fundamental problem is that plpgsql doesn't distinguish
properly between a null row value (eg, "null::somerowtype") and a
row of null values (eg, "row(null,null,...)::somerowtype").  When that
code was designed, our main SQL engine was pretty fuzzy about the
difference too, but now there is a clear semantic distinction.

For plpgsql's RECORD variables this doesn't seem hard to fix: just
take out the code in exec_move_row() that manufactures a row of nulls
when the input is null, and maybe make a few small adjustments
elsewhere.  For ROW variables there's a bigger problem, because those
are represented by a list of per-field variables, which doesn't
immediately offer any way to represent overall nullness.  I think it
could be dealt with by adding an explicit "the row as a whole is null"
flag to struct PLpgSQL_row.  I haven't tried to code it though, so I'm
not sure if there are gotchas or unreasonably large code changes needed
to make it happen.

I thought for a little bit about whether we couldn't get rid of ROW
variables entirely, or at least make them work more like RECORD variables
by storing a HeapTuple instead of a list of per-field variables.  But
I soon found out that the reason to have them is to be able to describe
the assignment target of SQL statements that assign to multiple scalar
variables, eg "SELECT ... INTO x,y,z".

Comments?

                       regards, tom lane


[HACKERS] Null row vs. row of nulls in plpgsql

I looked a bit at the bug report here:
http://archives.postgresql.org/pgsql-bugs/2008-09/msg00164.php

ISTM that the fundamental problem is that plpgsql doesn't distinguish
properly between a null row value (eg, "null::somerowtype") and a
row of null values (eg, "row(null,null,...)::somerowtype"). When that
code was designed, our main SQL engine was pretty fuzzy about the
difference too, but now there is a clear semantic distinction.

For plpgsql's RECORD variables this doesn't seem hard to fix: just
take out the code in exec_move_row() that manufactures a row of nulls
when the input is null, and maybe make a few small adjustments
elsewhere. For ROW variables there's a bigger problem, because those
are represented by a list of per-field variables, which doesn't
immediately offer any way to represent overall nullness. I think it
could be dealt with by adding an explicit "the row as a whole is null"
flag to struct PLpgSQL_row. I haven't tried to code it though, so I'm
not sure if there are gotchas or unreasonably large code changes needed
to make it happen.

I thought for a little bit about whether we couldn't get rid of ROW
variables entirely, or at least make them work more like RECORD variables
by storing a HeapTuple instead of a list of per-field variables. But
I soon found out that the reason to have them is to be able to describe
the assignment target of SQL statements that assign to multiple scalar
variables, eg "SELECT ... INTO x,y,z".

Comments?

regards, tom lane

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

Re: [GENERAL] Minor bug/inconveniance with restore from backup, using PITR base backup and archived wal files

Tom Lane wrote:
> Tommy Gildseth <tommy.gildseth@usit.uio.no> writes:
>> After a bit of looking around, and with some help from the fine people
>> in #postgresql on freenode, I think I figured out what was going on.
>> The last wal archive file was 00000001000000030000009F, and after
>> finishing recovery, postgresql created the file 00000002000000030000009F
>> (ie. 00000002 instead of 00000001) in pg_xlog.
>
> It's customary for PG to "create" new XLOG segments by recycling old
> ones.
>
>> The wal-files were
>> archived read-only, and this file permission seemed to be carried over
>> to the new file created by postgresql in pg_xlog, causing the cluster to
>> fall over and die.
>
> I would say that the bug is in your restore script: it should have made
> sure that the files it copies into the xlog directory are given the
> right ownership/permissions.


Well, the restore command(script) is simply copied from the suggestion
in the manual (restore_command = 'cp /path/to/my/archived/wal/files/%f
"%p"'). In my opinion, it's not very obvious that the last wal file
needs read/write permissions set, and it's certainly not documented
anywhere on
http://www.postgresql.org/docs/current/static/continuous-archiving.html
that I can see.
There's also the matter of the inconsistency that postgresql knows to
recycle *and* chmod the file if it's originally located in pg_xlog/
folder, but not if it's originally located in the wal files archive
folder. I guess it's more of a gotcha than a bug per se.

--
Tommy Gildseth

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

[pgeu-general] European PostgreSQL Day 2008's schedule has been published

Ciao!

I'm pleased to announce that the schedule for the European PGDay 2008
conference has now been published. Over the course of the two day
conference, there are 28 sessions planned covering a wide range of
topics in both English and Italian.

For complete details of the schedule, please see
http://www.pgday.org/en/schedule .

PGDay 2008 is a free PostgreSQL conference being held in Prato,
Tuscany, Italy on October the 17th and 18th. For more details, please
see the website: http://www.pgday.org/ .

Registration for the conference is free, however places are limited
for safety reasons. To avoid disappointment, please register as soon as
possible at http://register.pgday.org/ .

Thanks,
Gabriele
--
Gabriele Bartolini - Responsabile logistica PostgreSQL Day 2008
gabriele.bartolini@pgday.org - www.pgday.org - www.postgresql.org
Associazione Culturale Italian PostgreSQL Users Group - www.itpug.org
"PostgreSQL, the world's most advanced open-source database"

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

[pgsql-jobs] Pg server hacks needed: alter catalogs to only show permitted/owned objects

Please contact me via email off-list. This phase is getting
quotes/estimates for the work, which will lead to the client's decision
as to whether to move forward.

We have a system where many users share the same database, with varying
permissions to tables. We also host multiple databases, named after the
customer for administrative purposes. We want various pg_catalog tables
modified to only show "appropriate" objects, so as to preserve the
privacy of our customers and to simplify the view to show only items to
which the user has access. While some system views do this (eg
pg_catalog.tables) many do not (eg pg_catalog.tablespace) and it's these
latter which are used by most clients.

Specifics so far, and additional suggestions are welcome along these veins:

* These changes cannot be made just to the psql client; we need them
made at the server level so they cannot be bypassed simply by switching
clients! Still, I'll use the psql \ commands for brevity.

* Superusers should see all tables and databases, the current behavior.

* \dt and \ds et al should only show items to which the user has access.

* \l should only show the existing database, not others.

* Having a postgresql.conf option to toggle these "simplifications" may
be appropriate.

These changes must be contributed back to the PgSQL project if the PgSQL
project will accept them (I believe them to be of great applicability in
a shared-hosting environment), with credits to yourself for the code and
to our client for the funding.

--
Gregor Mosheh / Greg Allensworth BS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS development & hosting services, http://www.HostGIS.com/

"Remember that no one cares if you can back up,
only if you can restore." - AMANDA

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

[COMMITTERS] pgsql: Compare escaped chars case insensitively for ILIKE - per gripe

Log Message:
-----------
Compare escaped chars case insensitively for ILIKE - per gripe from TGL.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/adt:
like_match.c (r1.20.2.1 -> r1.20.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c?r1=1.20.2.1&r2=1.20.2.2)

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

Re: [GENERAL] sequence... my nightmare :-(

On Sat, Sep 27, 2008 at 10:21 AM, Alain Roger <raf.news@gmail.com> wrote:
> if i double-quote it, postgre tells me that the column accounts_id_seq does
> not exist.

You almost got it. You need to doublequote to tell nextval with
capitalization correctly, then single quote that so the query planner
doesn't say "oh look! An identifier!

create sequence "Abc";
CREATE SEQUENCE
select nextval('Abc');
ERROR: relation "abc" does not exist
select nextval('"Abc"');
nextval
---------
1
(1 row)

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

[COMMITTERS] pgsql: Compare escaped chars case insensitively for ILIKE - per gripe

Log Message:
-----------
Compare escaped chars case insensitively for ILIKE - per gripe from TGL.

Modified Files:
--------------
pgsql/src/backend/utils/adt:
like_match.c (r1.22 -> r1.23)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c?r1=1.22&r2=1.23)

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

[pgadmin-support] Re: [Fwd: Re: sudden program termination: no warning, error, or crash]

On Sep 26, 12:34 pm, a9006...@unet.univie.ac.at (Erwin Brandstetter)
wrote:
> Hi Kev!
>
> Please send this to the list, not to my private email account:
>
> pgadmin-supp...@postgresql.org
>
> Regards
> Erwin

Oh, no wonder...after a certain amount of time, there isn't actually a
"reply" option on Google Group threads anymore. Sorry again.

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

Friday, September 26, 2008

Re: [GENERAL] Is there any way to reliably influence WHERE predicate evaluation ordering?

Decibel! <decibel@decibel.org> writes:
> Does anyone have any ideas on a clean and reliable way to do this?

Use a trigger.

regards, tom lane

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

Re: [ADMIN] postgres at reboot

Hi Scott,

It's too bad (in this particular case) that you are
agreeing with me!  I want someone to find a hole in
my logic so that I can find a handle to fix the
problem.  The problem being that postgres doesn't get
started when the machine gets rebooted.

Regards,

Tena Sakai
tsakai@gallo.ucsf.edu


-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Fri 9/26/2008 1:44 PM
To: Tena Sakai
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] postgres at reboot

On Fri, Sep 26, 2008 at 2:38 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Scott,
>
> When I issue: /sbin/chkconfig --list | grep postgres
> it comes back with:
>
>  postgresql_ORG  0:off   1:off   2:off   3:off   4:off   5:off   6:off
>  postgresql      0:off   1:off   2:on    3:on    4:on    5:on    6:off
>
> I felt a bit strange that it says 'off' at run level 6.

Run level 6 is reboot, so that's normal.

> I went into /etc/rc.d and issued:
>  sudo find . -name \*postgresql\* -ls | grep S98postgresql
> and it came back with:
>
>  15618186    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc4.d/S98postgresql -> ../init.d/postgresql
>  15618294    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc3.d/S98postgresql -> ../init.d/postgresql
>  15618351    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc2.d/S98postgresql -> ../init.d/postgresql
>  15618024    0 lrwxrwxrwx   1 root     root           20 Aug 21 17:00
> ./rc5.d/S98postgresql -> ../init.d/postgresql
>
> Next, I went into /etc/rc.d/rc6.d and typed:
>  ls -l
> and it gave me this:
>      .       .  .    .      .  .   .   .         .              .        .
>      .       .  .    .      .  .   .   .         .              .        .
> lrwxrwxrwx   1 root root   20 Aug 21 17:00 S98postgresq ->
> ../init.d/postgresql
>
> There is an 'l' missing from the name!  I thought for a moment

It shouldn't  be there, sounds like someone added it by hand.

> I found the culprit, but then I issued the command below:
>  /sbin/chkconfig --list | grep '6:on'
> and it returned nothing.
>
> I am a bit confused.  As I understand, run level 6 means, in
> redhat context, shutdown and reboot.  But it seems in my case
> nothing is turned on for level 6.  Then that missing 'l'
> is really of no significance?

Right, nothing should be started for those run levels.