Re: [HACKERS] Indices pinned in pageable RAM?

2004-06-02 Thread Tom Lane
Marty Scholes <[EMAIL PROTECTED]> writes: > Has anyone seriously looked at how it would impact things to give the > DBA the option of storing certain indices in RAM instead of on disk? I'd classify it as an utter waste of time. If the index is being hit heavily, it will stay cached in RAM anyway

Re: [pgsql-hackers-win32] [HACKERS] select like...not using index

2004-06-02 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > Here is what I think happened (this might be a bug, might not): Each > night I run initdb but I use a special postgresql.conf which is > optimized for quick data loading. This is copied over the default one > after the server is started. This contai

Re: [HACKERS] pgsql-server: Adjust our timezone library to use pg_time_t (typedef'd

2004-06-02 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > Are the zic files something that should be updated for every minor > release, or only for every major release? AFAIK they don't change very often. regards, tom lane ---(end of broadcast)---

Re: [HACKERS] pgsql-server: Adjust our timezone library to use pg_time_t (typedef'd

2004-06-02 Thread Christopher Kings-Lynne
I did not modify the format of the zic timezone database files, which means that for the moment the system will not know about daylight-savings periods outside the range 1901-2038. Given the way the files are set up, it's not a simple decision like 'widen to 64 bits'; we have to actually think abo

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Andrew Dunstan
Christopher Kings-Lynne wrote: This has bitten me a couple times. In what version did it change? My feeling, and I'd like to see what everyone else thinks, is that if you do not specify a locale, you get "C." I think that initdb should default to something, and do the following: * Have an explic

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Christopher Kings-Lynne
This has bitten me a couple times. In what version did it change? My feeling, and I'd like to see what everyone else thinks, is that if you do not specify a locale, you get "C." I think that initdb should default to something, and do the following: * Have an explicit warnign if no locale specified,

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread pgsql
> Christopher Kings-Lynne wrote: >> > When this new behavior was introduced, and I migrated our databases to >> > the new PgSQL version (dump/restore), the locale of all my databases >> > were silently changed from C to US_en. This broke one application in a >> > very subtle way because of slightly

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Bruce Momjian
Christopher Kings-Lynne wrote: > > When this new behavior was introduced, and I migrated our databases to > > the new PgSQL version (dump/restore), the locale of all my databases > > were silently changed from C to US_en. This broke one application in a > > very subtle way because of slightly di

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Christopher Kings-Lynne
When this new behavior was introduced, and I migrated our databases to the new PgSQL version (dump/restore), the locale of all my databases were silently changed from C to US_en. This broke one application in a very subtle way because of slightly different sort behavior in the different locale.

Re: [HACKERS] Transaction aborts on syntax error.

2004-06-02 Thread Edwin S. Ramirez
Hello, I have a much clearer picture of the issue. So, does this mean that with nested transactions, all statements will execute within a mini-transaction, which may be executed within a branch of user defined sub-transactions. Such that: begin ... ... begin ... ... mini-tr

Re: [HACKERS] process num.

2004-06-02 Thread Jonathan Gardner
On Wednesday 02 June 2004 02:01 pm, ivan wrote: > > where can i set min/max number of process which are waiting for > connections from clients ? > First off, you are on the wrong list. This is more appropriate for the admin or preformance list. PostgreSQL forks a proce

Re: [HACKERS] Extended customizing, SQL functions,

2004-06-02 Thread Sailesh Krishnamurthy
> "pgsql" == pgsql <[EMAIL PROTECTED]> writes: pgsql> The have a database of information that is coming in at a pgsql> high speed regular basis. One bit of information is a pgsql> value. To get this value they must perform SELECT pgsql> sum(field) FROM table. Well, this simply

[HACKERS] process num.

2004-06-02 Thread ivan
hi where can i set min/max number of process which are waiting for connections from clients ? bye ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] constraint upon view

2004-06-02 Thread Jonathan Gardner
On Monday 31 May 2004 06:38 am, Pierre Emmanuel Gros wrote: > Hi, > I would like to know if i can add constraint and typed column upon a > create view sentence. > something like create view toto (a INTEGER primary key , b VARCHAR) as > select . > If it is not possible , what t

[HACKERS] Indices pinned in pageable RAM?

2004-06-02 Thread Marty Scholes
Has anyone seriously looked at how it would impact things to give the DBA the option of storing certain indices in RAM instead of on disk? Queries (both select and insert/update) against heavily indexed tables do most of the reads and writes to the index trees and relatively little reading and

[HACKERS] constraint upon view

2004-06-02 Thread Pierre Emmanuel Gros
Hi, I would like to know if i can add constraint and typed column upon a create view sentence. something like create view toto (a INTEGER primary key , b VARCHAR) as select . If it is not possible , what to have to change in the backend sources to obtain the result ??? Thank you Pierre

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Tom Lane <[EMAIL PROTECTED]> writes: > Shridhar Daithankar <[EMAIL PROTECTED]> writes: >> I was toying around with idea of converting all the memory related >> parameters in postgresql.conf to kilobytes for simplicity and >> uniformity. > Why is that a good idea?

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Andrew Dunstan
Paul Ramsey wrote: Just because it is not new does not mean that it is good. Sure. I've been caught by it too. Once. :-) When this new behavior was introduced, and I migrated our databases to the new PgSQL version (dump/restore), the locale of all my databases were silently changed from C to US_

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Stephan Szabo
On Wed, 2 Jun 2004 [EMAIL PROTECTED] wrote: > Is it me or has the default locale of created databases change at some point? > > Currently, on Linux, if one does not specify a locale, the locale is taken > from the system environment and it is not "C." > > While I can both sides of a discussion, I

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Paul Ramsey
Just because it is not new does not mean that it is good. When this new behavior was introduced, and I migrated our databases to the new PgSQL version (dump/restore), the locale of all my databases were silently changed from C to US_en. This broke one application in a very subtle way because of

Re: [HACKERS] Default Locale in initdb

2004-06-02 Thread Andrew Dunstan
[EMAIL PROTECTED] wrote: Is it me or has the default locale of created databases change at some point? Currently, on Linux, if one does not specify a locale, the locale is taken from the system environment and it is not "C." While I can both sides of a discussion, I think that choosing a "locale" w

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Bruce Momjian
Alvaro Herrera wrote: > On Wed, Jun 02, 2004 at 12:23:37PM -0400, Bruce Momjian wrote: > > Tom Lane wrote: > > > > If we go with a global CID counter then we don't have to add that step. > > > > Seems Alvaro is already using a global counter. > > I think I stated already that I'm in fact using i

[HACKERS] Default Locale in initdb

2004-06-02 Thread pgsql
Is it me or has the default locale of created databases change at some point? Currently, on Linux, if one does not specify a locale, the locale is taken from the system environment and it is not "C." While I can both sides of a discussion, I think that choosing a "locale" without one being specif

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Alvaro Herrera
On Wed, Jun 02, 2004 at 12:23:37PM -0400, Bruce Momjian wrote: > Tom Lane wrote: > > If we go with a global CID counter then we don't have to add that step. > > Seems Alvaro is already using a global counter. I think I stated already that I'm in fact using it. Not sure why it didn't show up in

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Alvaro Herrera
On Wed, Jun 02, 2004 at 11:12:31AM -0400, Tom Lane wrote: > A global CID counter would also simplify other visibility tests. Alvaro > hasn't said anything about how he's doing visibility checks across > different subxacts of the same main xact, but without global CID there > would need to be some

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I don't understand why a single counter is needed for phantom xids. We > > keep the cmin/cmax on the tuple already, and our own backend can look up > > the xmin/xmax that goes with the phantom. > > Oh, so you're thinking of an intern

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Alvaro Herrera
On Wed, Jun 02, 2004 at 10:54:36PM +0800, Christopher Kings-Lynne wrote: > >Well, the spec doesn't have create permissions per se, but they do have > >a "usage" right on domains, and they specify that revoking that results > >in dropping objects: > > > > 7) For every abandoned domain descri

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > I don't understand why a single counter is needed for phantom xids. We > keep the cmin/cmax on the tuple already, and our own backend can look up > the xmin/xmax that goes with the phantom. Oh, so you're thinking of an internal table that provides a map

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Christopher Kings-Lynne
How about pg_dumpall dumps all users as superusers, and then changes them back to what they're supposed to be at the bottom of the script :) Leaves you in kind of a dangerous state if the script doesn't complete, doesn't it? If your script doesn't complete, it can leave you in all sorts of bad s

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Frank Wiles
On Wed, 02 Jun 2004 11:05:43 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: > Shridhar Daithankar <[EMAIL PROTECTED]> writes: > >> I remain unalterably opposed to the notion of measuring > >shared_buffers> in KB, but if you think you can get such a thing in > >over my objections, > > > Are you OK with

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Christopher Kings-Lynne
Someone else suggested having pg_dump dump all objects without ownership (so, on restore, they'd all initially be owned by the user running the script, hopefully a superuser) and then doing ALTER OWNERs and GRANTs at the bottom. Actually, this would probably only be reasonable if you fixed the ACLs

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Tom Lane
Frank Wiles <[EMAIL PROTECTED]> writes: > This may be an unreasonable suggestion, but how about allowing both? > I've seen several configuration systems do the following: > shared_buffers = 1 ( shared_buffers in pages ) > shared_buffers = 100M ( 100 MBs of shared_buffers )

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> Someone else suggested having pg_dump dump all objects without ownership >> (so, on restore, they'd all initially be owned by the user running the >> script, hopefully a superuser) and then doing ALTER OWNERs and GRANTs at >> the bottom. > Act

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Shridhar Daithankar
On Wednesday 02 June 2004 20:59, Tom Lane wrote: > Frank Wiles <[EMAIL PROTECTED]> writes: > > This may be an unreasonable suggestion, but how about allowing both? > > I've seen several configuration systems do the following: > > > > shared_buffers = 1 ( shared_buffers in pages ) > >

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Shridhar Daithankar
On Wednesday 02 June 2004 20:16, Tom Lane wrote: > Shridhar Daithankar <[EMAIL PROTECTED]> writes: > > Any updates/opinions? Should we convert assign hooks to perform actual > > assignment and custom validation instead of just custom validation? It is > > clear from README that it is for validation

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Bruce Momjian
Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > On Wed, Jun 02, 2004 at 09:52:28AM -0400, Tom Lane wrote: > >> AFAICS your proposal does not support this. The two cursors' snapshots > >> will differ only in the recorded current-cid for the outer transaction. > >> If the subtrans h

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Also, I it seems postgres --describe-config isn't working. It outputs > nothing here. Yeah, same here. I'll take a look --- I may have side-swiped that during recent hacking in main.c. regards, tom lane ---

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> I've been trying to think of ways to solve these problems by having a > >> main xact and all its subxacts share a common CID sequence (ie, a > >> subxact would have its own xid but would not start CID over at one).

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > How about pg_dumpall dumps all users as superusers, and then changes > them back to what they're supposed to be at the bottom of the script :) Leaves you in kind of a dangerous state if the script doesn't complete, doesn't it? Someone else su

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Tom Lane
Shridhar Daithankar <[EMAIL PROTECTED]> writes: >> I remain unalterably opposed to the notion of measuring shared_buffers >> in KB, but if you think you can get such a thing in over my objections, > Are you OK with MBs? I am fine with anything. No, I'm not. shared_buffers should be measured in b

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Tom Lane
Shridhar Daithankar <[EMAIL PROTECTED]> writes: > Any updates/opinions? Should we convert assign hooks to perform actual > assignment and custom validation instead of just custom validation? It is > clear from README that it is for validation purposes only.. As it should be. Assign hooks have n

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Christopher Kings-Lynne
Well, the spec doesn't have create permissions per se, but they do have a "usage" right on domains, and they specify that revoking that results in dropping objects: 7) For every abandoned domain descriptor DO, let S1.DN be the of DO. The following is effectively e

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I've been trying to think of ways to solve these problems by having a >> main xact and all its subxacts share a common CID sequence (ie, a >> subxact would have its own xid but would not start CID over at one). >> If you assume that, th

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> The problem here is not with pg_dump; the problem is that dropping >> privileges doesn't cascade to dropping objects that are dependent on >> those privileges. AFAICS the SQL spec requires us to be able to do >> the latter. > The spec really

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> This is exactly the same argument as not being able to overwrite cmin. > > > Basically the phantom xid's are a shorthand for saying the tuple was > > created by xid1 and deleted by xid2, both part of the same main

Re: [HACKERS] sync vs. fsync question

2004-06-02 Thread Jan Wieck
On 5/31/2004 9:45 PM, Christopher Kings-Lynne wrote: Hi, I had this question posed to me on IRC and I didn't know the answer. If all that is needed to ensure integrity is that the WAL is fsynced, what is wrong with just going: wal_sync_method = fsync fsync = false The assumption that WAL is all t

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Christopher Kings-Lynne
The problem here is not with pg_dump; the problem is that dropping privileges doesn't cascade to dropping objects that are dependent on those privileges. AFAICS the SQL spec requires us to be able to do the latter. The spec really requires that?? So basically we have RESTRICT and CASCADE on REV

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Wed, Jun 02, 2004 at 09:52:28AM -0400, Tom Lane wrote: >> AFAICS your proposal does not support this. The two cursors' snapshots >> will differ only in the recorded current-cid for the outer transaction. >> If the subtrans has overwritten xmin/cmin,

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Alvaro Herrera
On Wed, Jun 02, 2004 at 09:52:28AM -0400, Tom Lane wrote: > BEGIN; > DECLARE CURSOR c1 FOR SELECT * FROM a ...; > INSERT INTO a VALUES(...); -- call this row x > DECLARE CURSOR c2 FOR SELECT * FROM a ...; > BEGIN; > DELETE FROM a WHERE ...;-- assume

Re: [HACKERS] Nested transactions and tuple header info

2004-06-02 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> This is exactly the same argument as not being able to overwrite cmin. > Basically the phantom xid's are a shorthand for saying the tuple was > created by xid1 and deleted by xid2, both part of the same main > transaction. > A cursor

Re: [HACKERS] Converting postgresql.conf parameters to kilobytes

2004-06-02 Thread Shridhar Daithankar
Hi, Any updates/opinions? Should we convert assign hooks to perform actual assignment and custom validation instead of just custom validation? It is clear from README that it is for validation purposes only.. Or Shall i look for some place else to perform conversion? Shridhar On Tuesday 01 Ju

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: > I think we need a proper 'effective user' facility. > At the moment, there's breakage if a super user creates a language, then > drops their superuser privs, then the dump cannot be restored. The problem here is not with pg_dump; the problem

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Tom Lane
Fabien COELHO <[EMAIL PROTECTED]> writes: > Due to how ACL are defined in SQL, I restate my suggestion that the super > user should be able to change ANY right, including the GRANTOR field, I'm unconvinced of this: that philosophy soon leads you into allowing the superuser to create self-inconsist

Re: [pgsql-hackers-win32] [HACKERS] select like...not using index

2004-06-02 Thread Merlin Moncure
> Hmmm, snipped from your reply was the explain plan from the query where it > was clear you were using two different character data types: bpchat and > text. That, alone, may have been a problem. > Looking at your defaults, did you do: > initdb --locale=C somepath I reran initdb --locale=C yester

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread John Hansen
On Wed, 2004-06-02 at 18:44, Christopher Kings-Lynne wrote: > > REVOKE ALL ON TABLE foo FROM GRANTOR [USER] alice; > > > > The super user must really be a *super* user. > > I think we need a proper 'effective user' facility. > > At the moment, there's breakage if a super user creates a language,

Re: [HACKERS] query INSERT OR REPLACE

2004-06-02 Thread Christopher Kings-Lynne
In SQLite or MySQL there is a statement INSERT OR REPLACE , is something like this in postgres , or could be ? No, there isn't and there currently isn't anyone working on adding it. Chris ---(end of broadcast)--- TIP 9: the planner will ignore your d

[HACKERS] query INSERT OR REPLACE

2004-06-02 Thread ivan
Hi In SQLite or MySQL there is a statement INSERT OR REPLACE , is something like this in postgres , or could be ? ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Christopher Kings-Lynne
REVOKE ALL ON TABLE foo FROM GRANTOR [USER] alice; The super user must really be a *super* user. I think we need a proper 'effective user' facility. At the moment, there's breakage if a super user creates a language, then drops their superuser privs, then the dump cannot be restored. All other fa

Re: [HACKERS] ACLs versus ALTER OWNER

2004-06-02 Thread Fabien COELHO
Dear Tom, > [...] > Even more interesting, the superuser can't fix it either, Due to how ACL are defined in SQL, I restate my suggestion that the super user should be able to change ANY right, including the GRANTOR field, with an appropriate syntax, something like: REVOKE ALL ON TABLE foo FROM