[HACKERS] Question about explain of index scan

2005-09-01 Thread Hannu Krosing
How does Index scan perform a scan for overlapping Index Cond ? If I get a plan like this, what will actually be performed if EXPLAIN shows this: Sort (cost=12.90..12.91 rows=1 width=207) Sort Key: log_actionseq -> Index Scan using sl_log_1_idx2_hu, sl_log_1_idx2_hu, sl_log_1_idx2_hu, sl

Re: [HACKERS] Two different defs of MAX_TUPLES_PER_PAGE

2005-09-01 Thread ITAGAKI Takahiro
Tom Lane <[EMAIL PROTECTED]> wrote: > #define MAX_TUPLES_PER_PAGE ((BLCKSZ - 1) / > (MAXALIGN(offsetof(HeapTupleHeaderData, t_bits)) + sizeof(ItemIdData)) + 1) > (I believe that both modules want a ceiling definition not a floor > definition, ie round up any fraction. The -1 / +1 trick is of cou

Re: [HACKERS] typo? was: Version number in psql banner

2005-09-01 Thread Tino Wildenhain
Am Donnerstag, den 01.09.2005, 23:34 -0500 schrieb Jim C. Nasby: > On Thu, Sep 01, 2005 at 11:18:25PM +0100, Simon Riggs wrote: > As a side note, there's a typo in \?: > > \c[onnect] [DBNAME|- [USER]] > > Note the | where there should be a ]. No ;) The | stands for the alternative. The whole

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Michael Fuhr
On Thu, Sep 01, 2005 at 11:34:37PM -0500, Jim C. Nasby wrote: > As a side note, there's a typo in \?: > > \c[onnect] [DBNAME|- [USER]] > > Note the | where there should be a ]. Eh? Looks right to me; the | indicates an alternate, i.e., that you can use either DBNAME or -. I often use - to co

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Jim C. Nasby
On Thu, Sep 01, 2005 at 11:18:25PM +0100, Simon Riggs wrote: > On Thu, 2005-09-01 at 14:53 -0400, Tom Lane wrote: > > Darcy Buskermolen <[EMAIL PROTECTED]> writes: > > > Yes I've seen the same frustration from users, I think the banner should > > > say > > > something along the lines of "psql cli

Re: [HACKERS] Two different defs of MAX_TUPLES_PER_PAGE

2005-09-01 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > I found two different definitions of MAX_TUPLES_PER_PAGE. > Which is reasonable? Or do they have another meaning? Hmm, I think those were both my fault at different times :-(. Right now I am thinking that they are both not quite right, in particular i

Re: Additional background daemon (was: [HACKERS] Remove xmin and cmin from frozen tuples)

2005-09-01 Thread Jim C. Nasby
On Thu, Sep 01, 2005 at 11:22:07PM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > On Thu, Sep 01, 2005 at 09:22:35AM -0400, Tom Lane wrote: > >> This is a bad idea. The bgwriter isn't the place to be doing freezing, > > > So is this something that another daemon could han

Re: Additional background daemon (was: [HACKERS] Remove xmin and cmin from frozen tuples)

2005-09-01 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > On Thu, Sep 01, 2005 at 09:22:35AM -0400, Tom Lane wrote: >> This is a bad idea. The bgwriter isn't the place to be doing freezing, > So is this something that another daemon could handle? Possibly, but I'd be inclined to think of it as autovacuum's p

Additional background daemon (was: [HACKERS] Remove xmin and cmin from frozen tuples)

2005-09-01 Thread Jim C. Nasby
On Thu, Sep 01, 2005 at 09:22:35AM -0400, Tom Lane wrote: > ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > > I agree. I think an good position of freezer is on bgwriter. > > My idea is: > > 1. Just before bgwriter writes an dirty page in LRU order, > > 2. Freeze tuples in the page and repair fr

Re: Tracing I/O (was: [HACKERS] 8.1 and syntax checking at create time)

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 09:06:29PM -0500, Jim C. Nasby wrote: > On Wed, Aug 31, 2005 at 04:08:10PM -0400, huaxin zhang wrote: > > I am new to this hacker's job. What I was looking for was to record > > the actual disk IO performed for arbituary query plan. I searched > > in backend/executor but not

Tracing I/O (was: [HACKERS] 8.1 and syntax checking at create time)

2005-09-01 Thread Jim C. Nasby
On Wed, Aug 31, 2005 at 04:08:10PM -0400, huaxin zhang wrote: > I am new to this hacker's job. What I was looking for was to record > the actual disk IO performed for arbituary query plan. I searched > in backend/executor but not sure if that was the right place to > add a tracer. would the /backe

Re: [HACKERS] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Matthew Miller
Title: RE: PL/pgSQL: EXCEPTION NOSAVEPOINT >if I could get into the TRY section of the PG_CATCH()/PG_TRY() > construct without an intervening elog(ERROR) then I'd have a > chance ... Sorry, I meant "the CATCH section of the PG_TRY()/PG_CATCH() construct."

[HACKERS] Two different defs of MAX_TUPLES_PER_PAGE

2005-09-01 Thread ITAGAKI Takahiro
Hi, I found two different definitions of MAX_TUPLES_PER_PAGE. Which is reasonable? Or do they have another meaning? backend/commands/vacuumlazy.c #define MAX_TUPLES_PER_PAGE ((int) (BLCKSZ / sizeof(HeapTupleHeaderData))) backend/nodes/tidbitmap.c #define MAX_TUPLES_PER_PAGE ((BLCKSZ - 1) / MA

Re: [HACKERS] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Matthew Miller
Title: RE: PL/pgSQL: EXCEPTION NOSAVEPOINT > In general I don't think it even makes sense to think of making > executor rollback non-transactional. Agreed. I would not want to rollback some statements and not others within a transaction.  I would like a complete rollback to happen, but onl

Re: [HACKERS] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Christopher Kings-Lynne
Why don't you just use EnterpriseDB? Chris That would defeat my goal of not rewriting all my Oracle code. If I were fool enough to plan an attack on the main executor's exception handling to try and disarm it of its subtransaction semantics, where would I start? Where would I end? What would

[HACKERS] Avoid using swap in a cluster

2005-09-01 Thread Ricardo Humphreys
Hi.   In a cluster, is there any way to use the main memory of the other nodes instead of the swap? If I have a query with many sub-queries and a lot of data, I can easily fill all the memory in a node. The point is: is there any way to continue using the main memory from other nodes in the same qu

Re: [HACKERS] Pre-allocated free space for row

2005-09-01 Thread Bruce Momjian
Tom Lane wrote: > Hannu Krosing <[EMAIL PROTECTED]> writes: > > My wild guess is that deleting all index pointers for a removed index is > > more-or-less the same cost as creating new ones for inserted/updated > > page. > > Only if you are willing to make the removal process recalculate the > inde

Re: [HACKERS] Pre-allocated free space for row

2005-09-01 Thread Tom Lane
Bruce Momjian writes: > I assume that for a vacuum that only hit pages indicated in the bitmap, > it would still be necessary to do an index scan to remove the heap > pointers in the index, right? Given the current vacuum technology, yes. However, bearing in mind that indexes should generally be

Re: [HACKERS] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Tom Lane
Matt Miller <[EMAIL PROTECTED]> writes: > If I were fool enough to plan an attack on the main executor's exception > handling to try and disarm it of its subtransaction semantics, where > would I start? Where would I end? What would I do in between? Can New > Orleans be rebuilt above sea level?

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread aly . dharshi
On Thu, 1 Sep 2005, Darcy Buskermolen wrote: Yes I've seen the same frustration from users, I think the banner should say something along the lines of "psql client version foo connected to server bar version sfoo" I second this, I think that something like "psl client version 8.03 connected

Re: [HACKERS] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Matt Miller
On Thu, 2005-09-01 at 18:28 -0400, Tom Lane wrote: > Matt Miller <[EMAIL PROTECTED]> writes: > > Basically I'd like my Pl/pgSQL code to be able to utilize the try/catch > > paradigm of error handling without the overhead of subtransactions > > [Pl/pgSQL] can't even do 2+2 without > calling the ma

Re: [HACKERS] ALTER TABLE ( smallinto -> boolean ) ...

2005-09-01 Thread Marc G. Fournier
On Thu, 1 Sep 2005, Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Tom Lane wrote: Sure you can. Make a SQL or PLPGSQL function that does the conversion you want and then create a cast using it. That probably won't help him much with "values(0)": If I remember the context of

Re: [HACKERS] PL/pgSQL: EXCEPTION NOSAVEPOINT

2005-09-01 Thread Tom Lane
[ redirected to -hackers, where it's actually on topic ] Matt Miller <[EMAIL PROTECTED]> writes: > [redirected from -patches] > On Wed, 2005-08-03 at 16:25 -0400, Tom Lane wrote: >> This fundamentally breaks the entire backend. You do not have the >> option to continue processing after elog(ERROR

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Simon Riggs
On Thu, 2005-09-01 at 14:53 -0400, Tom Lane wrote: > Darcy Buskermolen <[EMAIL PROTECTED]> writes: > > Yes I've seen the same frustration from users, I think the banner should > > say > > something along the lines of "psql client version foo connected to server > > bar > > version sfoo" > > Th

Re: [HACKERS] rename constraint behavior for duplicate names?

2005-09-01 Thread Allan Wang
On Thu, 2005-09-01 at 17:55 -0400, Tom Lane wrote: > Allan Wang <[EMAIL PROTECTED]> writes: > > Alright, I see why the checks are still needed. The unique index should > > be on relname, conname right? Also looking into DROP CONSTRAINT's code, > > it gives a notice about "multiple constraint names

Re: [HACKERS] rename constraint behavior for duplicate names?

2005-09-01 Thread Tom Lane
Allan Wang <[EMAIL PROTECTED]> writes: > (It would still be used for suppressing the not-exists error) Right, which is why RemoveRelConstraints has to tell if it removed anything. The API could be changed, but not to "returns void". regards, tom lane

Re: [HACKERS] rename constraint behavior for duplicate names?

2005-09-01 Thread Tom Lane
Allan Wang <[EMAIL PROTECTED]> writes: > Alright, I see why the checks are still needed. The unique index should > be on relname, conname right? Also looking into DROP CONSTRAINT's code, > it gives a notice about "multiple constraint names dropped" when > RemoveRelConstraints(rel, conname) returns

Re: [HACKERS] rename constraint behavior for duplicate names?

2005-09-01 Thread Allan Wang
On Thu, 2005-09-01 at 17:16 -0400, Tom Lane wrote: > Allan Wang <[EMAIL PROTECTED]> writes: > > I've been looking through the code from CommentConstraint > > and ATExecDropConstraint and they error out on duplicate constraint > > names for a relation. However, ADD CONSTRAINT's code checks for > > d

Re: [HACKERS] Using multi-locale support in glibc

2005-09-01 Thread Tom Lane
Martijn van Oosterhout writes: > Do we have some platforms that don't have any multi-language support? I > mean, we don't have a complete thread library but a wrapper around the > ones used on the platform. Couldn't we make a similar wrapper that used > glibc if it was available, windows native if

Re: [HACKERS] upgrade path / versioning roles

2005-09-01 Thread Patrick Welche
On Thu, Sep 01, 2005 at 02:31:15PM -0400, Tom Lane wrote: > Patrick Welche <[EMAIL PROTECTED]> writes: > > I think we still recommend using *new* pg_dump to dump *old* server when > > upgrading. If one tries that with today's pg_dump (8.1beta1) against > > a 8.1devel server of 6 May, i.e., predati

Re: [HACKERS] ALTER TABLE ( smallinto -> boolean ) ...

2005-09-01 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Sure you can. Make a SQL or PLPGSQL function that does the conversion >> you want and then create a cast using it. > That probably won't help him much with "values(0)": If I remember the context of the original request, it wasn't ab

Re: [HACKERS] ALTER TABLE ( smallinto -> boolean ) ...

2005-09-01 Thread Andrew Dunstan
Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: On Mon, 29 Aug 2005, Tom Lane wrote: No, because there's no built-in cast from smallint to bool. 'k, I just took a read through the "CREATE CAST" man page, and don't think I can use that for this, Sure

Re: [HACKERS] rename constraint behavior for duplicate names?

2005-09-01 Thread Tom Lane
Allan Wang <[EMAIL PROTECTED]> writes: > I've been looking through the code from CommentConstraint > and ATExecDropConstraint and they error out on duplicate constraint > names for a relation. However, ADD CONSTRAINT's code checks for > duplicates and errors out, so would the stuff in comment/drop

Re: [HACKERS] Using multi-locale support in glibc

2005-09-01 Thread Martijn van Oosterhout
On Thu, Sep 01, 2005 at 01:46:00PM -0400, Tom Lane wrote: > Martijn van Oosterhout writes: > > 1. Is something supported by glibc usable for us (re portability to > > non-glibc platforms)? > > Nope. Sorry. Do we have some platforms that don't have any multi-language support? I mean, we don't ha

Re: [HACKERS] ALTER TABLE ( smallinto -> boolean ) ...

2005-09-01 Thread Tom Lane
"Marc G. Fournier" <[EMAIL PROTECTED]> writes: > On Mon, 29 Aug 2005, Tom Lane wrote: >> No, because there's no built-in cast from smallint to bool. > 'k, I just took a read through the "CREATE CAST" man page, and don't think > I can use that for this, Sure you can. Make a SQL or PLPGSQL functi

Re: [HACKERS] ALTER TABLE ( smallinto -> boolean ) ...

2005-09-01 Thread Marc G. Fournier
On Mon, 29 Aug 2005, Tom Lane wrote: "Marc G. Fournier" <[EMAIL PROTECTED]> writes: # ALTER TABLE table ALTER COLUMN field1 type boolean; ERROR: column "field1" cannot be cast to type "pg_catalog.bool" Should this not work? No, because there's no built-in cast from smallint to bool. You

[HACKERS] GRANT/roles problem: grant is shown as from login role

2005-09-01 Thread Tom Lane
Consider the following example: regression=# create user u1; CREATE ROLE regression=# create user u2; CREATE ROLE regression=# create user u3; CREATE ROLE regression=# grant u1 to u2; GRANT ROLE regression=# \c - u1 You are now connected as new user "u1". regression=> create table t1(f1 int); CREA

[HACKERS] rename constraint behavior for duplicate names?

2005-09-01 Thread Allan Wang
I'm starting to get into PostgreSQL development by implementing: %Allow ALTER TABLE ... ALTER CONSTRAINT ... RENAME from the TODO. I've been looking through the code from CommentConstraint and ATExecDropConstraint and they error out on duplicate constraint names for a relation. However, A

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Tom Lane
Darcy Buskermolen <[EMAIL PROTECTED]> writes: > Yes I've seen the same frustration from users, I think the banner should say > something along the lines of "psql client version foo connected to server bar > version sfoo" That seems overly verbose, particularly in the normal case where the versio

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Thu, Sep 01, 2005 at 04:34:09PM +0100, Simon Riggs wrote: >> On Wed, 2005-08-31 at 22:25 -0400, Alvaro Herrera wrote: >>> Now, one thing of note is that you need to "compress" the page in order >>> to actually be able to use the just-freed space. VAC

Re: [HACKERS] upgrade path / versioning roles

2005-09-01 Thread Tom Lane
Patrick Welche <[EMAIL PROTECTED]> writes: > I tried the fix mentioned in the earlier message to encourage > validation. Now dumping this "fixed" database, and loadinging it into the > new database gives: > ALTER FUNCTION > psql:./huge.db:4403: ERROR: function plpgsql_validator(oid) does not exis

Re: [HACKERS] Using multi-locale support in glibc

2005-09-01 Thread Tom Lane
Martijn van Oosterhout writes: > 1. Is something supported by glibc usable for us (re portability to > non-glibc platforms)? Nope. Sorry. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [HACKERS] PG_PAGE_LAYOUT_VERSION - Should be Documented as 3?

2005-09-01 Thread Tom Lane
Matt Miller <[EMAIL PROTECTED]> writes: > doc/src/sgml/storage.sgml says: There's a number of things not updated yet in that file :-( I believe it hasn't heard of pg_twophase either. regards, tom lane ---(end of broadcast)--

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Andrew - Supernews
On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: > Andrew Dunstan <[EMAIL PROTECTED]> writes: >> Tom Lane wrote: >>> Change the ownership of public in template1 to be a "dbadmin" group. >>> Grant membership in "dbadmin" to all the DB owners. End of problem. > >> Won't that suddenly grant the own

Re: [HACKERS] upgrade path / versioning roles

2005-09-01 Thread Tom Lane
Patrick Welche <[EMAIL PROTECTED]> writes: > I think we still recommend using *new* pg_dump to dump *old* server when > upgrading. If one tries that with today's pg_dump (8.1beta1) against > a 8.1devel server of 6 May, i.e., predating roles, one gets: [ shrug... ] The current code is expecting t

Re: [HACKERS] Minimally avoiding Transaction Wraparound in VLDBs

2005-09-01 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > My first proposal is to add an extra parameter onto the > index_bulk_delete() call - ntuples. If ntuples == 0 then btbulkdelete() > will avoid scanning and return immediately. If a scan occurs, then we > keep track of how many tuples have been marked delete

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Tom Lane
Josh Berkus writes: >> THe only fundamental disadvantage that COPY labors under is having to >> write WAL records. It might be interesting to do something similar to >> the recent hacks for CREATE TABLE AS, so that a COPY into a table just >> created in the current transaction would skip writing

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 04:34:09PM +0100, Simon Riggs wrote: > On Wed, 2005-08-31 at 22:25 -0400, Alvaro Herrera wrote: > > I was thinking that when the tuple > > needs to be obsoleted it would need to grow to accomodate the Xmax, but > > you are not actually proposing to remove that, so it seems

Re: [HACKERS] PG_PAGE_LAYOUT_VERSION - Should be Documented as 3?

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 03:36:12PM +, Matt Miller wrote: > But src/include/storage/bufpage.h says: > > "/* > * Page layout version number 0 is for pre-7.3 Postgres releases. > * Releases 7.3 and 7.4 use 1, denoting a new HeapTupleHeader layout. > * Release 8.0 changed the HeapTupleHeader l

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 09:20:48AM -0700, Josh Berkus wrote: > > What I'm saying is that you can write a heap file, on which the tuples > > would all have xmin=FrozenTransactionId, xmax=Invalid, and the > > corresponding bits set in the infomask. This ensures that no matter the > > state of the s

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Darcy Buskermolen
On Thursday 01 September 2005 08:30, Peter Eisentraut wrote: > A release or two ago we added the version number to the psql welcome > banner. I noticed that quite a few people interpret that as the server > version. Somehow, the explicit display of the version numbers leads them to > make inference

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Josh Berkus
Peter, > A release or two ago we added the version number to the psql welcome > banner. I noticed that quite a few people interpret that as the server > version. Somehow, the explicit display of the version numbers leads them to > make inferences that they would otherwise not bother about. Has an

Re: [HACKERS] Version number in psql banner

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 05:30:34PM +0200, Peter Eisentraut wrote: > A release or two ago we added the version number to the psql welcome banner. > I noticed that quite a few people interpret that as the server version. > Somehow, the explicit display of the version numbers leads them to make >

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread Steve Atkins
On Thu, Sep 01, 2005 at 09:17:38AM +0800, William ZHANG wrote: > > Dave Page wrote: > > > > > >>* Compile with MSVC on Win32 platforms. MySQL support it. > > >> > > >So what? It would take a major amount of work, with no useful benefits. > > > > ... and you can compile all the client and libra

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Change the ownership of public in template1 to be a "dbadmin" group. >> Grant membership in "dbadmin" to all the DB owners. End of problem. > Won't that suddenly grant the owner of foo_db dbadmin rights in bar_db? > That seems to v

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Josh Berkus
Tom, > THe only fundamental disadvantage that COPY labors under is having to > write WAL records. It might be interesting to do something similar to > the recent hacks for CREATE TABLE AS, so that a COPY into a table just > created in the current transaction would skip writing WAL and instead > f

[HACKERS] upgrade path / versioning roles

2005-09-01 Thread Patrick Welche
I think we still recommend using *new* pg_dump to dump *old* server when upgrading. If one tries that with today's pg_dump (8.1beta1) against a 8.1devel server of 6 May, i.e., predating roles, one gets: pg_dump: SQL command failed pg_dump: Error message from server: ERROR: relation "pg_catalog.p

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Andrew Dunstan
Tom Lane wrote: Change the ownership of public in template1 to be a "dbadmin" group. Grant membership in "dbadmin" to all the DB owners. End of problem. Won't that suddenly grant the owner of foo_db dbadmin rights in bar_db? That seems to violate the principle of least surprise. ch

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Andrew - Supernews
On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: > Andrew - Supernews <[EMAIL PROTECTED]> writes: >> On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: >>> Change the ownership of public in template1 to be a "dbadmin" group. >>> Grant membership in "dbadmin" to all the DB owners. End of problem.

[HACKERS] PG_PAGE_LAYOUT_VERSION - Should be Documented as 3?

2005-09-01 Thread Matt Miller
doc/src/sgml/storage.sgml says: "The last 2 bytes of the page header, pd_pagesize_version, store both the page size and a version indicator. Beginning with PostgreSQL 8.0 the version number is 2; PostgreSQL 7.3 and 7.4 used version number 1; prior releases used version number 0." But src/include

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Tom Lane
Martijn van Oosterhout writes: > On Thu, Sep 01, 2005 at 08:50:27AM -0400, Tom Lane wrote: >> varchar could do something like using 24 bits for the length >> and 8 bits for an encoded indication of the charset. > With the unfortunate effect that strings are limited to 16Mb instead of > 1Gb. No,

Re: [HACKERS] broken configure, broken makefile?

2005-09-01 Thread Alvaro Herrera
You current problem has to do with multiline "gcc --version". You could backport the fix for that, or you could wrap gcc with a script so it only reports only line for --version. I have 7.1.3 running here, I patched configure as attached. Very ugly, but it works. > Easy there guys! I'm in the

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Josh Berkus
Alvaro, > What issues did he raise on this? On having no Xmin. > What I'm saying is that you can write a heap file, on which the tuples > would all have xmin=FrozenTransactionId, xmax=Invalid, and the > corresponding bits set in the infomask. This ensures that no matter the > state of the serve

Re: [HACKERS] 8.1beta, Subtle bug in COPY in Solaris systems

2005-09-01 Thread Sergey E. Koposov
On Thu, 1 Sep 2005, Tom Lane wrote: > "Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > > 2660c2660 > > < if (isdigit(hex)) > > --- > > > if (isdigit((unsigned char)hex)) > > Sigh. We keep fixing these, and they keep creeping back in. I wish > there were a way to get some more-mainstr

Re: [HACKERS] Minimally avoiding Transaction Wraparound in VLDBs

2005-09-01 Thread Simon Riggs
On Thu, 2005-09-01 at 10:29 +0100, Simon Riggs wrote: > On Wed, 2005-08-31 at 22:21 -0400, Tom Lane wrote: > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > On Wed, 2005-08-31 at 19:24 -0400, Tom Lane wrote: > > >> If you don't remove any tuples, > > >> you don't scan the indexes anyway IIRC. > >

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 11:08:36AM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > What I'm saying is that you can write a heap file, on which the tuples > > would all have xmin=FrozenTransactionId, xmax=Invalid, and the > > corresponding bits set in the infomask. This ensu

[HACKERS] Using multi-locale support in glibc

2005-09-01 Thread Martijn van Oosterhout
Browsing the glibc stuff for locales I noticed that glibc does actually allow you to specify the collation order to strcoll and friends. The feature is however marked with: Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. They do

[HACKERS] Version number in psql banner

2005-09-01 Thread Peter Eisentraut
A release or two ago we added the version number to the psql welcome banner. I noticed that quite a few people interpret that as the server version. Somehow, the explicit display of the version numbers leads them to make inferences that they would otherwise not bother about. Has anyone else

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Tom Lane
Andrew - Supernews <[EMAIL PROTECTED]> writes: > On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: >> Change the ownership of public in template1 to be a "dbadmin" group. >> Grant membership in "dbadmin" to all the DB owners. End of problem. > Only if all db owners are equivalent. If you don't

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Martijn van Oosterhout
On Thu, Sep 01, 2005 at 08:50:27AM -0400, Tom Lane wrote: > Martijn van Oosterhout writes: > > Simply pass the (Node*) from the parser and let the function sort it > > out itself. Except now they have to be written in C. Is this > > unreasonable, > > Nope. You're not going to be writing any inte

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread Merlin Moncure
William wrote: > You are right. What I want is VC++ projects(*.dsp, *.dsw). Once the > project files is created, the maintance work is simply add/remove some > new/deleted source files (*.c only) from the dsps. > > And I think VC++ 6.0 is ok, it is power enough and not so big for pgsql's > develop

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Simon Riggs
On Wed, 2005-08-31 at 22:25 -0400, Alvaro Herrera wrote: > On Thu, Sep 01, 2005 at 10:45:44AM +0900, ITAGAKI Takahiro wrote: > > Hi, > > > I think it would be a waste to retain xmin and cmin for frozen tuples > > because their values represent only 'visible for all transactions'. > > Additionally

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > What I'm saying is that you can write a heap file, on which the tuples > would all have xmin=FrozenTransactionId, xmax=Invalid, and the > corresponding bits set in the infomask. This ensures that no matter the > state of the server, you can plug the fil

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Andrew - Supernews
On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: > Andrew - Supernews <[EMAIL PROTECTED]> writes: >> On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: >>> There is some merit in the thought that the DB owner should be able to >>> grant and revoke access on the public schema, but that no longer >

Re: [HACKERS] 8.1beta, Subtle bug in COPY in Solaris systems

2005-09-01 Thread Tom Lane
"Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > 2660c2660 > < if (isdigit(hex)) > --- > > if (isdigit((unsigned char)hex)) Sigh. We keep fixing these, and they keep creeping back in. I wish there were a way to get some more-mainstream compiler to warn about passing chars to the fu

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread William ZHANG
- Original Message - From: "Andrew Dunstan" <[EMAIL PROTECTED]> To: "Dave Page" Cc: "William ZHANG" <[EMAIL PROTECTED]>; Sent: Wednesday, August 31, 2005 10:24 PM Subject: Re: [HACKERS] Call for 7.5 feature completion > Dave Page wrote: > > > >>* Compile with MSVC on Win32 platforms.

Re: [HACKERS] broken configure, broken makefile?

2005-09-01 Thread David Fetter
On Thu, Sep 01, 2005 at 10:15:19AM -0400, Robert Treat wrote: > On Thursday 01 September 2005 09:15, Tom Lane wrote: > > Gavin Sherry <[EMAIL PROTECTED]> writes: > > > And this is the reason why it is old. You're asking for pain if > > > you're using 7.0.3 and this is just the start. > > > > There

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Tom Lane
Andrew - Supernews <[EMAIL PROTECTED]> writes: > On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: >> There is some merit in the thought that the DB owner should be able to >> grant and revoke access on the public schema, but that no longer >> requires ownership, only membership in an appropriate

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread William ZHANG
- Original Message - > From: "Dave Page" > To: "Andrew Dunstan" <[EMAIL PROTECTED]>; "William ZHANG" <[EMAIL PROTECTED]> > Cc: > Sent: Thursday, September 01, 2005 3:21 PM > Subject: RE: [HACKERS] Call for 7.5 feature completion > > And even those are a royal pain to maintain, never mi

[HACKERS] 8.1beta, Subtle bug in COPY in Solaris systems

2005-09-01 Thread Sergey E. Koposov
Hello, First, I'll show the warnings seen when compiling postgres on SunOS 5.6 with gcc 3.2.1 copy.c: In function `GetDecimalFromHex': copy.c:2660: warning: subscript has type `char' copy.c: In function `CopyReadAttributesText': copy.c:2805: warning: subscript has type `char' copy.c:2813: warni

Re: [HACKERS] broken configure, broken makefile?

2005-09-01 Thread Robert Treat
On Thursday 01 September 2005 09:15, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > And this is the reason why it is old. You're asking for pain if you're > > using 7.0.3 and this is just the start. > > There are several good reasons why the community stopped supporting > versions b

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Alvaro Herrera
On Wed, Aug 31, 2005 at 09:14:42PM -0700, Josh Berkus wrote: > > One thing that comes to mind is that this makes somewhat easier to build > > a tool to write pre-built tables, for bulk-loading purposes. You just > > construct the binary file with the HEAP_FROZEN bit set, and then attach > > the f

Re: [HACKERS] Minimally avoiding Transaction Wraparound in VLDBs

2005-09-01 Thread Alvaro Herrera
On Thu, Sep 01, 2005 at 04:21:58AM -, Andrew - Supernews wrote: > On 2005-09-01, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > On Thu, Sep 01, 2005 at 01:57:02AM +0100, Simon Riggs wrote: > > > >> > If you're using autovacuum then the problem is already taken care of. > >> > >> autovacuum will

Re: [HACKERS] Minimally avoiding Transaction Wraparound in VLDBs

2005-09-01 Thread Tom Lane
Josh Berkus writes: > So, will per-table XID tracking allow us to avoid *ever* vacuuming some > tables? If your definition of "ever" is less than a billion transactions, sure. (As Simon points out, with time-partitioned data sets that could often be arranged, so it's not a completely silly resp

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Andrew - Supernews
On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: > Andrew - Supernews <[EMAIL PROTECTED]> writes: >> On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: >>> There's considerable feeling that that TODO item is bogus anyway. > >> The issue that I've seen is that currently, allowing non-superusers to

Re: [HACKERS] Pre-allocated free space for row

2005-09-01 Thread Zeugswetter Andreas DAZ SD
> > The bgwriter could "update" all columns of dead heap tuples in heap > > pages to NULL and thus also gain free space without the need to touch > > the indexes. > > The slot would stay used but it would need less space. > > Not unless it's running a transaction (consider TOAST updates). Ok,

Re: [HACKERS] Remove xmin and cmin from frozen tuples

2005-09-01 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > I agree. I think an good position of freezer is on bgwriter. > My idea is: > 1. Just before bgwriter writes an dirty page in LRU order, > 2. Freeze tuples in the page and repair fragmentation. > 3. (Replace the fsm page that has least freespace.)

Re: [HACKERS] broken configure, broken makefile?

2005-09-01 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > And this is the reason why it is old. You're asking for pain if you're > using 7.0.3 and this is just the start. There are several good reasons why the community stopped supporting versions before 7.2, which we did quite some time ago. Don't expect a lot

Re: [HACKERS] TODO item: set proper permissions on non-system schemas

2005-09-01 Thread Tom Lane
Andrew - Supernews <[EMAIL PROTECTED]> writes: > On 2005-09-01, Tom Lane <[EMAIL PROTECTED]> wrote: >> There's considerable feeling that that TODO item is bogus anyway. > The issue that I've seen is that currently, allowing non-superusers to > create databases in a useful manner requires all sorts

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Tom Lane
Martijn van Oosterhout writes: >TYPMODFUNC =3D function( internal [, sometype ] ) RETURNS int32 or intar= > ray > Simply pass the (Node*) from the parser and let the function sort it > out itself. Except now they have to be written in C. Is this > unreasonable, Nope. You're not going to be

Re: [HACKERS] Pre-allocated free space for row

2005-09-01 Thread Tom Lane
"Zeugswetter Andreas DAZ SD" <[EMAIL PROTECTED]> writes: > The bgwriter could "update" all columns of dead heap tuples in heap > pages > to NULL and thus also gain free space without the need to touch the > indexes. > The slot would stay used but it would need less space. Not unless it's running a

Re: [HACKERS] Pre-allocated free space for row

2005-09-01 Thread Zeugswetter Andreas DAZ SD
> > My wild guess is that deleting all index pointers for a removed index > > is more-or-less the same cost as creating new ones for > > inserted/updated page. > > Only if you are willing to make the removal process > recalculate the index keys from looking at the deleted tuple. The bgwriter

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Martijn van Oosterhout
On Thu, Sep 01, 2005 at 11:12:26AM +0300, Hannu Krosing wrote: > Maybe make the last one "WITH CHARACTER SET xxx" and promote WITH to a > real keyword. > > It seems a good idea to have WITH as a real keyword anyway, as at least > ANSI/ISO syntax for recursive queries seem to require it too. Sorry

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Martijn van Oosterhout
On Thu, Sep 01, 2005 at 11:18:04AM +0200, Dennis Bjorklund wrote: > String types have 3 modifiers, the length, the charset and the collation. > The syntax of these are defined by the standard so at least that syntax > ought to be allowed (even if there are more work to actually do anything > wit

Re: [HACKERS] Minimally avoiding Transaction Wraparound in VLDBs

2005-09-01 Thread Simon Riggs
On Wed, 2005-08-31 at 22:21 -0400, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > On Wed, 2005-08-31 at 19:24 -0400, Tom Lane wrote: > >> If you don't remove any tuples, > >> you don't scan the indexes anyway IIRC. > > > No. Even if you remove *zero* tuples, an index is still scanne

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Dennis Bjorklund
On Thu, 1 Sep 2005, Martijn van Oosterhout wrote: > Err, well. My thought was a certain group of type-suffix options would > be permitted (only zero or one at a time), for example: > >WITH TIME ZONE >WITHOUT TIME ZONE >CHARACTER SET xxx String types have 3 modifiers, the length, the

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Hannu Krosing
On N, 2005-09-01 at 09:26 +0200, Martijn van Oosterhout wrote: > On Wed, Aug 31, 2005 at 05:14:13PM -0400, Tom Lane wrote: > > That strikes me as an unnecessary reduction in flexibility. As long as > > we make the hardwired type names translate to qualified names (same as > > they do now) we don't

Re: [HACKERS] On hardcoded type aliases and typmod for user types

2005-09-01 Thread Martijn van Oosterhout
On Wed, Aug 31, 2005 at 05:14:13PM -0400, Tom Lane wrote: > That strikes me as an unnecessary reduction in flexibility. As long as > we make the hardwired type names translate to qualified names (same as > they do now) we don't have to assume any such thing. Ack, there's fortunatly only a handful

Re: [HACKERS] Call for 7.5 feature completion

2005-09-01 Thread Dave Page
> -Original Message- > From: Andrew Dunstan [mailto:[EMAIL PROTECTED] > Sent: 01 September 2005 03:31 > To: William ZHANG > Cc: Dave Page; pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] Call for 7.5 feature completion > > > We currently have nmake files for the client libraries