[HACKERS] system info functions

2006-07-03 Thread Neil Conway
(1) The docs claim that pg_get_viewdef() returns the "CREATE VIEW command for view", but that is clearly not the case: postgres=# create view v1 as select 1; CREATE VIEW postgres=# select pg_get_viewdef('v1'::regclass::oid); pg_get_viewdef SELECT 1; (1 row) Should we change th

[HACKERS] binds only for s,u,i,d?

2006-07-03 Thread Agent M
Why are only select, insert, update, and delete supported for $X binds? Why can't preparation be used as a global anti-injection facility? Example using the backend protocol for binds: PREPARE TRANSACTION $1; bind $1 ['text'] -->syntax error at $1 Why am I able to prepare statements with the ba

Re: [HACKERS] Transaction and table partitioning

2006-07-03 Thread Greg Stark
"Dragan Zubac" <[EMAIL PROTECTED]> writes: > Hello > > Is it possible to use transactions with 'per sub table' locks? What I > mean,if I partition a table and use transaction on that table with > constraint,will the database lock the master table (and all subtables),or > only sub table where the

Re: [HACKERS] mysterious nbtree.c comment

2006-07-03 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > I don't see how the lack of deletions is relevant to needing vacuum-cycle-ID. > AFAICT there's still a risk that someone will come along and do a page split > underneath this scan and if the page is to the left of the scan it will be > missed. Well, if ther

[HACKERS] buildfarm stats

2006-07-03 Thread Andrew Dunstan
Sometime in late June the buildfarm passed 50,000 builds reported on. Here are stats over the lifetime. cheers andrew ym| builds | reporting_members ++--- 2004-10 |181 | 6 2004-11 | 1533 |12 2004-12 | 2468 |

Re: [HACKERS] mysterious nbtree.c comment

2006-07-03 Thread Simon Riggs
On Mon, 2006-07-03 at 16:34 -0400, Greg Stark wrote: > In nbtree.c there's a path that calls btvacuumscan to gather statistics if > there aren't already statistics. I'm not exactly clear how this code path is > reached but that's not my question. VACUUM calls access/index/index_vacuum_cleanup() w

[HACKERS] mysterious nbtree.c comment

2006-07-03 Thread Greg Stark
In nbtree.c there's a path that calls btvacuumscan to gather statistics if there aren't already statistics. I'm not exactly clear how this code path is reached but that's not my question. There's a comment that "there's no need to go through all the vacuum-cycle-ID pushups" in this case because no

Re: [HACKERS] Transaction and table partitioning

2006-07-03 Thread Bruno Wolff III
On Mon, Jul 03, 2006 at 14:59:49 +0200, Dragan Zubac <[EMAIL PROTECTED]> wrote: > > Is it possible to use transactions with 'per sub table' locks? What I > mean,if I partition a table and use transaction on that table with > constraint,will the database lock the master table (and all subtables),

Re: [HACKERS] Transaction and table partitioning

2006-07-03 Thread Simon Riggs
On Mon, 2006-07-03 at 14:59 +0200, Dragan Zubac wrote: > Is it possible to use transactions with 'per sub table' locks? What I > mean,if I partition a table and use transaction on that table with > constraint,will the database lock the master table (and all > subtables),or only sub table where the

[HACKERS] Transaction and table partitioning

2006-07-03 Thread Dragan Zubac
Hello Is it possible to use transactions with 'per sub table' locks? What I mean,if I partition a table and use transaction on that table with constraint,will the database lock the master table (and all subtables),or only sub table where the data is ? Sincerely Dragan Zubac

Re: [HACKERS] Auto selection of internal representation for integer NUMERIC

2006-07-03 Thread Tom Lane
ITAGAKI Takahiro <[EMAIL PROTECTED]> writes: > In particular, this is useful for oracle users. Oracle recommends to use > NUMBER(n, p) for all the case where numerics are required. So they try to > use NUMERIC on PostgreSQL instead of NUMBER. But NUMERIC is not the best > alternative to a short int

Re: [HACKERS] CVS mirror, was Re: [PATCHES] ADD/DROPS INHERIT (actually INHERIT

2006-07-03 Thread Marc G. Fournier
19 minutes past the hour, every hour ... On Mon, 3 Jul 2006, Andrew Dunstan wrote: [redirecting to -hackers] context: a buildfarm member apparently failed through getting a partial update from CVS, possibly because the anonymous mirror was also partially updated. Tom Lane wrote: "Andre

Re: [HACKERS] MultiXactID Wrap-Around

2006-07-03 Thread Tom Lane
paolo romano <[EMAIL PROTECTED]> writes: > My doubts now concern MultixactID wrap-around management. > Afaics, it is possible to spawn multixactids so quickly to have a > wrap-around and to start overwriting the data stored in the offset > slru (but analogous considerations apply to the member slr

[HACKERS] CVS mirror, was Re: [PATCHES] ADD/DROPS INHERIT (actually INHERIT / NO INHERIT)

2006-07-03 Thread Andrew Dunstan
[redirecting to -hackers] context: a buildfarm member apparently failed through getting a partial update from CVS, possibly because the anonymous mirror was also partially updated. Tom Lane wrote: "Andrew Dunstan" <[EMAIL PROTECTED]> writes: Since CVS updates are not atomic, it's hard

Re: [HACKERS] MultiXactID Wrap-Around

2006-07-03 Thread Andrew Dunstan
paolo romano wrote: ops, i did forget to update the e-mail subject, sorry. I am reposting it with an appropriate one. Please do NOT create a post on a new subject by using an MUA's reply mechanism, even if you replace the subject. The MUA will create an in-reply-to header which will be tot

[HACKERS] MultiXactID Wrap-Around

2006-07-03 Thread paolo romano
ops, i did forget to update the e-mail subject, sorry. I am reposting it with an appropriate one. I'm keeping on studying multixact.c and log management, and I hope you can help me, as usual, in clearing my doubts.My d

[HACKERS] update/insert, delete/insert efficiency WRT vacuum and MVCC

2006-07-03 Thread Mark Woodward
Is there a difference in PostgreSQL performance between these two different strategies: if(!exec("update foo set bar='blahblah' where name = 'xx'")) exec("insert into foo(name, bar) values('xx','blahblah'"); or exec("delete from foo where name = 'xx'"); exec("insert into foo(name, bar) values

Re: [HACKERS] [COMMITTERS] pgsql: Do a pass of code review for the ALTER TABLE

2006-07-03 Thread paolo romano
I'm keeping on studying multixact.c and log management, and I hope you can help me, as usual, in clearing my doubts.My doubts now concern MultixactID wrap-around management. Afaics, it is possible to spawn multixactids so quickly to have a wrap-around and to start overwriting the data stored in the

Re: [HACKERS] patch postgresql for AMD64 (Opteron)

2006-07-03 Thread Sven Geisler
Hi Tom, I remember that you provide a small SQL script to force the context switch storm. Can you provide a similar script for Pg 8.1.4? It looks to me that you get context switch storm if you access with SELECT one table from multiple clients. I have a customer which has an current XEON MP Dual

Re: [HACKERS] odd 7.4 build failure on new sparc machine

2006-07-03 Thread Andrew Dunstan
Tom Lane said: > Andrew Dunstan <[EMAIL PROTECTED]> writes: >> I am seeing a strange failure on the new box Sun donated, when trying >> to > >> ccache gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes >> -Wmissing-declarations -c tas.s /usr/ccs/bin/ld -r -o SUBSYS.o >> dynloader.o pg_sema.

[HACKERS] Auto selection of internal representation for integer NUMERIC

2006-07-03 Thread ITAGAKI Takahiro
Hi Hackers, I think about mapping NUMERIC(n) to fixed size integers corresponding to n: - n < 4 to int2 - 5 <= n < 9 to int4 - 10 <= n < 18 to int8 - 19 <= n to original numeric NUMERIC is not so efficient datatypes compared to fixed size integers. If the auto selection is aval