Re: [BUGS] Problem with ALTER TABLE - occasional "tuple concurrently updated"

2011-03-10 Thread Bruce Momjian

Was this fixed?

---

Alvaro Herrera wrote:
> Excerpts from Alvaro Herrera's message of jue nov 18 15:31:16 -0300 2010:
> > Excerpts from Robert Haas's message of jue nov 18 15:11:37 -0300 2010:
> > 
> > > In the current master branch, it appears that "ALTER TABLE c INHERIT
> > > p" takes a ShareUpdateExclusiveLock on the child, which seems
> > > sufficient, and an AccessShareLock on the parent, which seems like it
> > > might not be; though I'm having a hard time figuring out exactly when
> > > it wouldn't be, especially since in 8.4 I'm fairly sure any ALTER
> > > TABLE command takes an AccessExclusiveLock.
> > 
> > What if two of these run at the same time, and the parent doesn't
> > have children when they start?  They would both try to set
> > relhassubclass, no?
> 
> Yep, duplicated the issue that way.
> 
> -- 
> ??lvaro Herrera 
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
> 
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + It's impossible for everything to be true. +

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


Re: [BUGS] Problem with ALTER TABLE - occasional "tuple concurrently updated"

2011-03-10 Thread Robert Haas
On Thu, Mar 10, 2011 at 4:08 PM, Bruce Momjian  wrote:
> Was this fixed?

Not yet.  I can probably fix it, if nobody else wants to do it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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


Re: [BUGS] Problem with ALTER TABLE - occasional "tuple concurrently updated"

2011-03-10 Thread Bruce Momjian
Robert Haas wrote:
> On Thu, Mar 10, 2011 at 4:08 PM, Bruce Momjian  wrote:
> > Was this fixed?
> 
> Not yet.  I can probably fix it, if nobody else wants to do it.

Well, it has languished for five months, so the "nobody else wants" part
is probably accurate.  ;-)

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + It's impossible for everything to be true. +

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


Re: [BUGS] BUG #5814: documentation bug

2011-03-10 Thread Bruce Momjian
Antje Petersen wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:  5814
> Logged by:  Antje Petersen
> Email address:  antje.peter...@desy.de
> PostgreSQL version: 8.1.21
> Operating system:   Scientific Linux 5
> Description:documentation bug
> Details: 
> 
> According to the documentation
> createuser --no-superuser and 
> createuser --no-createrole is the default.
> This is not true. The default is to be asked
> Shall the new role be a superuser? (y/n) 
> Shall the new role be allowed to create more new roles? (y/n) 

Sorry for the late reply.  If you press "enter", "no" is the default.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + It's impossible for everything to be true. +

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


Re: [BUGS] Documentation bug: Chapter 35.4, paragraph 4

2011-03-10 Thread Jonathan Pool
> I just made the wording more generic

Thanks much.
ˉ


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


Re: [BUGS] Documentation bug: Chapter 35.4, paragraph 4

2011-03-10 Thread Bruce Momjian
Robert Haas wrote:
> On Tue, Nov 23, 2010 at 1:08 PM, Jonathan Pool  wrote:
> > Chapter 35.4, paragraph 4, of the PostgreSQL 9.0.1 Documentation says:
> >
> > Any collection of commands in the SQL language can be packaged together and 
> > defined as a function. Besides SELECT queries, the commands can include 
> > data modification queries (INSERT, UPDATE, and DELETE), as well as other 
> > SQL commands. (The only exception is that you cannot put BEGIN, COMMIT, 
> > ROLLBACK, or SAVEPOINT commands into a SQL function.)
> >
> > This appears to be incorrect, in that attempting to include a VACUUM 
> > command in a query-language function elicits the following error message:
> >
> > ERROR: ?VACUUM cannot be executed from a function or multi-command string
> >
> > Thus, presumably "VACUUM" should be added to the list of exceptions.
> 
> I fear it's worse than that.  Taking a look at the places where we
> call PreventTransactionChain(), they appear to include database-wide
> CLUSTER, DISCARD ALL, VACUUM (as you noted), COMMIT PREPARED, ROLLBACK
> PREPARED, CREATE TABLESPACE, DROP TABLESPACE, ALTER TYPE  ADD
> VALUE  (but the PreventTransactionChain call says ADD rather
> than ADD VALUE), CREATE INDEX CONCURRENTLY, CREATE DATABASE, DROP
> DATABASE, and REINDEX DATABASE.
> 
> I'm not sure if there's some generic way we could refer to all that
> rather than listing them all individually.

I just made the wording more generic;  we rarely are asked about this,
so generic seemed appropriate.  Applied doc patch attached.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
new file mode 100644
index c65f852..1a35014
*** a/doc/src/sgml/xfunc.sgml
--- b/doc/src/sgml/xfunc.sgml
***
*** 116,124 
   Besides SELECT queries, the commands can include data
   modification queries (INSERT,
   UPDATE, and DELETE), as well as
!  other SQL commands. (The only exception is that you cannot put
!  BEGIN, COMMIT, ROLLBACK, or
!  SAVEPOINT commands into a SQL function.)
   However, the final command
   must be a SELECT or have a RETURNING
   clause that returns whatever is
--- 116,124 
   Besides SELECT queries, the commands can include data
   modification queries (INSERT,
   UPDATE, and DELETE), as well as
!  other SQL commands. (You cannot use transaction control commands, e.g.
!  COMMIT, SAVEPOINT, and some utility
!  commands, e.g.  VACUUM, in SQL functions.)
   However, the final command
   must be a SELECT or have a RETURNING
   clause that returns whatever is

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


Re: [BUGS] BUG #5923: Build problem

2011-03-10 Thread C.S. Johnson
You were right. Although it defies reason that the flex that has worked all this time for other versions of pg is broken, the latest Windows version fixed the problem. Hats off.Nice release, too. My customer is betting the house on fdw.Charlie ...


 Original Message 
Subject: Re: [BUGS] BUG #5923: Build problem
From: Tom Lane 
Date: Wed, March 09, 2011 9:22 pm
To: "charles johnson" 
Cc: pgsql-bugs@postgresql.org

"charles johnson"  writes:
>   Build started: Project: postgres, Configuration: Release|Win32
>   Running bison on src\backend\replication\repl_gram.y
>   1 file(s) copied.
>   Running flex on src\backend\replication\repl_scanner.l
>   flex: fatal internal error, exec failed

You seem to have a rather broken version of flex :-(

However, if you were building from a distribution tarball you really
shouldn't have needed flex at all.  [ pokes around... ]  Oh, it looks
like the replication bison/flex output files aren't actually in the
tarballs after all.  Grumble.  I can fix that part at least.  But
you still ought to try to find a non-broken flex.

			regards, tom lane





Re: [BUGS] BUG #5765: pg_dump fail to find upper case table name

2011-03-10 Thread Bruce Momjian
Kevin Grittner wrote:
> Heikki Linnakangas  wrote:
>  
> > Manual says (at the bottom of 
> > http://www.postgresql.org/docs/8.4/static/app-pgdump.html):
> > 
> >> To specify an upper-case or mixed-case name in -t and related
> >> switches, you need to double-quote the name; else it will be
> >> folded to lower case (see Patterns). But double quotes are
> >> special to the shell, so in turn they must be quoted. Thus, to
> >> dump a single table with a mixed-case name, you need something
> >> like
> >>
> >> $ pg_dump -t '"MixedCaseName"' mydb > mytab.sql
>  
> Perhaps some of that should be moved up to the definition of the -t
> switch?  It wouldn't seem too out of place to me to put it somewhere
> near this sentence:
>  
> | When using wildcards, be careful to quote the pattern if needed to
> | prevent the shell from expanding the wildcards.
>  
> While examples are useful, information which is only provided there
> is easily missed when someone goes to read up on a particular
> switch.

I have applied the attached doc patch to reference the example section
from the specific pg_dump options sections.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + It's impossible for everything to be true. +
diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml
new file mode 100644
index 25dc2a7..e78d275
*** a/doc/src/sgml/ref/pg_dump.sgml
--- b/doc/src/sgml/ref/pg_dump.sgml
*** PostgreSQL documentation
*** 301,307 
  linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
  so multiple schemas can also be selected by writing wildcard characters
  in the pattern.  When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards.
 
  
 
--- 301,308 
  linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
  so multiple schemas can also be selected by writing wildcard characters
  in the pattern.  When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards;  see
! .
 
  
 
*** PostgreSQL documentation
*** 435,441 
  linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
  so multiple tables can also be selected by writing wildcard characters
  in the pattern.  When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards.
 
  
 
--- 436,443 
  linkend="APP-PSQL-patterns" endterm="APP-PSQL-patterns-title">),
  so multiple tables can also be selected by writing wildcard characters
  in the pattern.  When using wildcards, be careful to quote the pattern
! if needed to prevent the shell from expanding the wildcards;  see
! .
 
  
 
*** CREATE DATABASE foo WITH TEMPLATE templa
*** 973,979 
   
  
   
!   Examples
  

 To dump a database called mydb into a SQL-script file:
--- 975,981 
   
  
   
!   Examples
  

 To dump a database called mydb into a SQL-script file:

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