free blog   apache   shopping directory   php powered
kemohi
bluelaguna??unix
pg_docbot_adzFor information about 'unix' see:
pg_docbot_adzhttp://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
kavehHi everyone, I am searching (lamely) in google for a while, can anyone tell me when I have a STATEMENT based trigger how can I get the current statement?
kavehLike the NEW parameter in ROW baed triggers
RhodiumToadno
StuckMojohehe, "no, we won't tell you"
StuckMojoi think he means "no, you can't"
copumpkinif I had a src, dst table representing an arbitrary graph and wanted to fetch all incoming and outgoing edges from a given node in a single query, could a CTE help me there?
copumpkinwhere src and dst are just ints representing nodes (and a row is an edge)
RhodiumToadyou don't need a cte for that
copumpkinwell, I wanted to go a level deeper after that
RhodiumToadUNION is your friend
kaveh:) Thanks a lot, so it seems it is impossible
RhodiumToadjust one level, or many?
copumpkinthe more general thing I want is to fetch (not recursively): the queried node, all nodes incoming and outgoing from it; all incoming nodes for the nodes discovered from queried nodes outgoings, and vice versa
copumpkinkind of hard to explain
copumpkina bit like http://en.wikipedia.org/wiki/Markov_blanket, except I also want the outgoings of my incomings
Kenaniah??replication
pg_docbot_adzFor information about 'replication' see:
pg_docbot_adzhttp://slony.info/ :: http://www.postgres-r.org :: http://www.commandprompt.com/products/mammothreplicator/ :: http://bucardo.org/ :: https://projects.commandprompt.com/public/replicator :: http://wiki.postgresql.org/wiki/Streaming_Replication
pg_docbot_adzhttp://momjian.us/main/writings/pgsql/replication.pdf :: http://www.postgresql.org/docs/current/static/high-availability.html :: http://pgfoundry.org/projects/skytools/ :: http://www.pgcluster.org
copumpkinis that something I can do with a CTE, or is it something I should still do with some subqueries and some unions?
RhodiumToadyou can do literally anything with a CTE, the only question is whether you're better off with static unions
RhodiumToad(CTEs are turing-complete)
copumpkinI figured I might get more sharing with a CTE
copumpkinas I need to both retrieve the direct neighbors and use them in a query to find their neighbors
RhodiumToadcopumpkin: that may or may not make up for the overhead
Kenaniahthoughts on bucardo anyone?
s34nI'd like to install a pg Windows client
s34nbut the downloads seem to be for the whole enchilada
copumpkinRhodiumToad: hmm
s34nis there a minimal windows client install somewhere?
s34njust enough to let me connect to a server on another machine?
StuckMojopgadmin?
Snow-Mansadly, I don't think so
Snow-Manyea, you could grab pgadmin, if that's the interface you want
Snow-Manif you want actual psql, you have to pull out the bits you need from the big package that edb provides, iirc
StuckMojoi imagine the pgadmin3 installer comes with libpq, if not you could grab the pg odbc driver and use any odbc enabled client
s34nwell, not exactly
Snow-Manyes, pgadmin3 comes with libpq, iirc
s34nStuckMojo: right idea though
Snow-Mans34n: what client do you want?
Snow-Manthat's probably the first question..
s34nStuckMojo: I'm trying to connect from AutoCAD :(
StuckMojooh, go odbc then
Snow-Manwhat does autocad support?  odbc?
s34nwhich thought it would invent it's own FDO
s34nand the FDO provider for postgis doesn't seem to actually include the dlls for connecting
kemohave to load ~100 GB into 5 different dbms an record which performs better in terms of speed (sec). is ther some kind of "best practise" or a super special universally usable bulk loading tool?
Snow-Mans34n: that's kind of curious.  My guess is that it needs libpq...
StuckMojoIME almost anything windows can talk odbc
Action: Snow-Man doesn't know much about FDO
Snow-Mankemo: how about "pick a database based on your actual requirements rather than some arbitrary metric"
breinbaaskemo: most dbms have their own superspecialised bulkloader
s34nSnow-Man: yes. it does
breinbaasthe comparison can be interesting in itself, if you can put enough time into tuning each system
s34nSnow-Man: more curiouser, it also needs MSVCR90.dll
breinbaaskemo: which systems?
kemowin server 2003
Snow-Manindeed..  PG has COPY and pg_restore, Oracle has imp, Mysql has 'load data'...
breinbaassybase, bcp
StuckMojos34n: that would mean it expects that your libpq was built with VC, which is not surprising
Snow-ManStuckMojo: odd that they don't distribute it
StuckMojos34n: the 'R' is redistributable, so you can get that dll easily
Snow-ManI would guess it comes w/ pgadmin3 tho..
s34nI should be able to grab MSVCR90.dll and IESHIMS.dll
s34nI just scratch my head that they aren't included in their silly provider to begin with
Snow-Manthey're probably expecting that you've installed the whole PG system
Snow-Manand don't want to have duplicate/possibly different versions, running around
StuckMojothat or they didn't realize they were linked to it because it was down the chain or something
StuckMojoit's easy not to realize
Snow-Mansadly, windows sucks, and doesn't have the kind of nice packaging system that real systems, like Debian, do
StuckMojomost machines you test on have VC installed, and thus already have it
StuckMojoso you don't realize you need it until you're at a client site doing an install ;)
StuckMojoPITA
s34nIf only I could replace AutoCAD with some nice Unix-based solution...
StuckMojoblender?
StuckMojoheh
Snow-Manblender is pretty cool
Action: s34n chuckles
s34nblender gis would be interesting
Snow-Manautocad does gis?
Snow-Manbeen a long time, but I don't remember lat/longs in autocad. :)
breinbaas can someone clean this up?     http://pgsql.privatepaste.com/7848a3cc44    (xlog monitoring SQL)
breinbaasthere is just no way to get info from the master db, is there?
Snow-Manhuh, autocad map 3d does look kinda neat
perry81yes
Snow-Manbreinbaas: might be cleaner as a pl/pgsql function..
breinbaasyes, that's probably better
quentusrex_I'm trying to drop a database, but there are still connections
quentusrex_how do I disconnect all sessions and drop the database?
quentusrex_I'm trying to restore from a backup...
adsquentusrex_: stop all applications
adsquentusrex_: including your own connection.
adsquentusrex_: you can connect to another database (like "postgres" or "template1")
sfuentesanyone how i can get the status result of an EXECUTE statement in a stored procedure?
quentusrex_ads, how do I force it off?
quentusrex_I can't find the one remote user who has his pgadmin3 still connected.
adsselect * from pg_stat_activity;
quentusrex_and how do I force off the connections?
adsshutdown your db, modify pg_hba.conf and reject all new connections for this database.
Kenaniahquentusrex: if your server consists of only one database, you can "pg_ctl stop -m immediate", create your recovery file, and start
codeaholicquabbin_: you can always kill their postgres process
codeaholiclook for the pid from pg_stat_activity and kill -9 it
adscodeaholic: NO
adsNever ever kill -9 a postmaster
ads-1 is enough
codeaholicokay  HUP it
Kenaniahdoesn't hup just tell it to re-ready config?
Kenaniah*re-read the config?
adsYou risk a corrupt shared memory
codeaholicah
adsKenaniah: not for the single postmaster prozess
codeaholicKenaniah: that's just by convention.  a process can do anything it wants in the HUP signal handler
adscodeaholic: please don't give such advises if you don't know what your advise is doing!
codeaholicads: we all make mistakes.  even you
Kenaniahcodeaholic: that was  a pretty catastrophic mistake =P
codeaholicchill out.  you were here to save the data.  contrats captain awesome
adscodeaholic: yeah, even me.
codeaholicMy _POINT_ was that you can kill the process associated with his connection and disconnect him
adssure - if you kill -9 it, you can even end up with having the database closing all connections and doing a recovery.
copumpkinthis looks pretty hardcore: http://pastie.org/817418
copumpkinanyone have any suggestions?
endpoint_davidcopumpkin: describe what your query is attempting to accomplish
copumpkinendpoint_david: for a given node, get all edges involving: its successors, its predecessors, its successors' predecessors, and its predecessors' successors
BlueAidan_work??tweakers
pg_docbot_adzFor information about 'tweakers' see:
pg_docbot_adzhttp://tweakers.net/reviews/649/7
pg_docbot_adzhttp://tweakers.net/reviews/661/7
copumpkinthere are no seq scans, which makes me happy
copumpkinbut I'm not sure if it's as efficient as it can be
copumpkin(it's going to be running on a huge table)
orangesok raid 10 for db
orangesnow how bad will it be to set that up under linux
orangeslike software raid
copumpkinlines 36,37 and 41,42 seem identical... is that shared?
orangesI haven't done 10
copumpkinhow bad would raid 6 be for a database?
orangesI was told raid 10 is bestest
orangesraid 5 bad write speed
copumpkinyeah
copumpkinmakes sense
orangesI love big women.
copumpkingood to know.
orangespostgresql seems to be able to handle some serious heavy lifting
orangesI am guna install it tomorrow
jay321folks is it possible to have a private/local and public schema, where one table exists in both spaces, as a local version, then public version? in oracle, you can have a user$foo table, then a public$foo table as well. all sql acts on the user$foo by default.
endpoint_davidjay321: yes
endpoint_davidthe resolution is determined by the search_path, which is usually $user,public
jay321endpoint_david, ok thank you for your quick response, what is this set up referred to in the docs?
endpoint_david??schema
pg_docbot_adzFor information about 'schema' see:
pg_docbot_adzhttp://www.postgresql.org/docs/current/static/sql-dropschema.html :: http://www.postgresql.org/docs/current/static/information-schema.html :: http://www.postgresql.org/docs/current/static/ddl-schemas.html
pg_docbot_adzhttp://www.postgresql.org/docs/current/static/sql-createschema.html :: http://www.postgresql.org/docs/current/static/ddl-schemas.html#DDL-SCHEMAS-CREATE :: http://www.postgresql.org/docs/current/static/sql-alterschema.html
pg_docbot_adzhttp://www.postgresql.org/docs/current/static/sql-expressions.html#AEN1693
endpoint_david??search_path
pg_docbot_adzFor information about 'search_path' see:
pg_docbot_adzhttp://www.postgresql.org/docs/current/static/ddl-schemas.html#DDL-SCHEMAS-PATH
jay321pretty cool, thank you again :D
endpoint_davidprobably that last one will be most useful
neruda_when i run 'postgres -D $somevar >logfile 2>&1 &' I get an error in logfile that says: FATAL: unrecognized configuration parameter "max_fsm_pages"
neruda_any thoughts?
neruda_anyone awake in here
Snow-Manperhaps
Snow-ManI don't typically run postgres that way, heh.
path#define awake.h
Snow-Manlooks like you're using a version which doesn't have max_fsm_pages as a config option in any case though
Snow-ManI hope you're not trying to do an in-place upgrade between major versions, that's not typically supported..  You can do it with an add-on utility between 8.3 and 8.4, but that's about it...
jmoironhi all;  what determines the unix socket that postgresql runs on?  something seemingly switched it up on me (maybe an upgrade) and i ran into trouble for a bit
jmoironsolved (for now?) but would like to know for the future;  it appears mine is named .s.PGSQL.5433 now, but my app was expecting 5432
Snow-Manare you running Debian?
Snow-ManTry checking pg_lsclusters ?
jmoironit says 5432 is down..
Snow-Manbasically, the # in the unix socket name is derived from the port number
jmoironnot quite;  yeah, i figured that, since 5432 is the default port
Snow-Manperhaps you did a major-version upgrade and the old cluster is still configured on the default port..?
jmoironperhaps;  i thought i had done so a while ago..  it says the main cluster is down
jmoironbut i have one running that pg_lsclusters doesn't list
jmoironor.. i have something running, on that alternate port, that appears to be functional;  and other data directories
Snow-Mansounds kinda messy
Snow-Mandid you install from source or something?
jmoironit's not anything close to mission critical just wondering how things went pear..  no, I just don't recall an upgrade recently other than one from 8.3 -> 8.4
jmoironwhich are completely separated on debian
Snow-Manerm, they'd both show up in pg_lsclusters ...
Snow-Manif you used the Debian packages and whatnot, which I would recommend
Snow-Manberen:/home/sfrost> pg_lsclusters
Snow-ManVersion Cluster   Port Status Owner    Data directory                     Log file
jmoironi did
Snow-Man8.3     main      5432 online postgres /var/lib/postgresql/8.3/main       /var/log/postgresql/postgresql-8.3-main.log
Snow-Man8.4     main      5433 online postgres /var/lib/postgresql/8.4/main       /var/log/postgresql/postgresql-8.4-main.log
Snow-Manheh.
Snow-Manwe're still working on our migration from 8.3 to 8,4. :)
jmoironi don't see that;  i see this
jmoironwell
jmoironthe same as your second line
jmoironexcept the status is 'down'
Snow-Manhrmpf.
commxi'm a bit confused about how pgsql deals with integers. do I have to use int8 to store unsigned integers > 2 billion?
Popular searches: missing   udev runlevel wodim   rewb0rn facebook   dry run slackpkg   monitor rtl8191SEVA2   

Generated by irclog2html.pl 2.1mg by Jeff Waugh - return