Re: [BUGS] BUG #6715: 9.2b2 psql \ir does not understand leading ../
On Tue, Jul 3, 2012 at 11:41 PM, Tom Lane wrote: > j...@well.com writes: >> When I do >> \ir ../bar.sql >> I get the bar.sql file in the CWD. > > AFAICS, it works fine when \ir is used interactively. However, > you seem to be using it from a script: > >> $ psql -aX greg -f foo.sql > > and then indeed it does not work so well. psql is trying to evaluate > the \ir relative to the script file's location, using this code: > > snprintf(relpath, MAXPGPATH, "%s", pset.inputfile); > get_parent_directory(relpath); > join_path_components(relpath, relpath, filename); > canonicalize_path(relpath); > > The get_parent_directory() call reduces "foo.sql" to an empty string, > which seems a tad bogus --- wouldn't "." be better? But in any case, > join_path_components() thinks it can process a "../" prefix of the > tail argument by stripping a directory name from the head argument, > and there's nothing there to strip. So IMO join_path_components() > is flat-out broken when applied to a non-absolute head path. > Not sure about what a useful solution would be. I may not have time to look at this today, but I think this behavior worked fine in the last version[1] of Gurjeet's \ir patch which I reviewed, which had different behavior for pathname normalization than what got committed. Josh [1] http://archives.postgresql.org/message-id/BANLkTi=eW_nUH9195=9upqf7treg4uh...@mail.gmail.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: [BUGS] BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
On Mon, Jul 02, 2012 at 01:28:36PM -0400, Bruce Momjian wrote: > This is the trimmed-down code block: > > if (!binary_upgrade) > { > appendPQExpBuffer(q, "CREATE EXTENSION IF NOT EXISTS %s WITH SCHEMA > %s;\n", > qextname, fmtId(extinfo->namespace)); > } > else > { > --> appendPQExpBuffer(q, "DROP EXTENSION IF EXISTS %s;\n", qextname); > appendPQExpBuffer(q, > "SELECT binary_upgrade.create_empty_extension("); > > The idea is that the IF NOT EXISTS and IF EXISTS are symmetric, which is > my goal. > > > address the points I made about reproducing the previous state in cases > > where the admin removed the language or changed its permissions. > > Well, it still does the create extension in binary mode like before --- > not sure what the problem is. Applied and back-patched to 9.2. -- 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 #6706: pg_upgrade fails when plpgsql dropped/re-created
Bruce Momjian writes: >>> address the points I made about reproducing the previous state in cases >>> where the admin removed the language or changed its permissions. >> Well, it still does the create extension in binary mode like before --- >> not sure what the problem is. > Applied and back-patched to 9.2. I do not believe that this patch fixes the problem, and I also believe that it creates new problems. Please revert. 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
[BUGS] BUG #6716: memory of Autovacuum leak?
The following bug has been logged on the website: Bug reference: 6716 Logged by: runner.mei Email address: runner@gmail.com PostgreSQL version: 9.1.3 Operating system: win2003 Description: My program using a postgresql9.1.3, and running in win2003. Generally have 17-18 processes of postgresql, the memory of any process no more than 60M, but today the memory of a process to reach 880M.At first I thought it was temporary, but until now has been going on for 9 hours, and continues to grow.The parameters of the process for "- forkavlauncher -x3" someone can help me? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6718: Cannot delete, create or check existence of extension
The following bug has been logged on the website: Bug reference: 6718 Logged by: Gary Haran Email address: gary.ha...@gmail.com PostgreSQL version: 9.1.4 Operating system: OS X Description: development=# select version(); version --- PostgreSQL 9.1.4 on x86_64-apple-darwin11.4.0, compiled by Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn), 64-bit (1 row) development=# create extension hstore; ERROR: type "hstore" already exists development=# drop extension hstore; ERROR: extension "hstore" does not exist development=# CREATE EXTENSION IF NOT EXISTS hstore; ERROR: type "hstore" already exists -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #6717: bad file
The following bug has been logged on the website: Bug reference: 6717 Logged by: Steve Commanda Email address: ste...@nfn.ca PostgreSQL version: 9.1.4 Operating system: suse 11.4 Description: downloaded latest version. opened it up and some game came up. -- 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 #6717: bad file
On 07/04/2012 11:02 PM, ste...@nfn.ca wrote: The following bug has been logged on the website: Bug reference: 6717 Logged by: Steve Commanda Email address: ste...@nfn.ca PostgreSQL version: 9.1.4 Operating system: suse 11.4 Description: downloaded latest version. opened it up and some game came up. You didn't download it from PostgreSQL.org or EnterpriseDB, then. If you did, it got intercepted by malware on your computer. Please provide the URL you downloaded PostgreSQL from and the installer file name and size. -- Craig Ringer -- 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 #6718: Cannot delete, create or check existence of extension
On 07/05/2012 02:05 AM, gary.ha...@gmail.com wrote: development=# create extension hstore; ERROR: type "hstore" already exists development=# drop extension hstore; ERROR: extension "hstore" does not exist development=# CREATE EXTENSION IF NOT EXISTS hstore; ERROR: type "hstore" already exists First, thanks for the info in the report. At a guess, it has the hstore data type in it from before the extension system exists. You need to follow the upgrade instructions to convert it to an extension. This isn't a bug in that Pg is working as designed, though it's certainly not very nice user interface. See: http://www.postgresql.org/docs/9.1/static/sql-createextension.html specifically the "FROM old_version" clause, eg: CREATE EXTENSION hstore FROM unpackaged; (I think that's right; I haven't used the extension system in an upgrade). If you need more help please ask on pgsql-general as this doesn't appear to be a bug from the information supplied. However, I think "CREATE EXTENSION" should emit a HINT for already-exists errors, guiding people to info on how to upgrade the extension. I'm assuming the database "development" was loaded from a dump from an older version or was binary-upgraded from an older version. If it was created anew on 9.1, how did the "hstore" type get loaded? -- Craig Ringer -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs