public.commandprompt.com: Issueshttps://public.commandprompt.com/https://public.commandprompt.com/favicon.ico?16484970162016-12-09T07:11:35Zpublic.commandprompt.com
Redmine postgresql-snap - Feature #5327 (In Progress): New snap packages to be createdhttps://public.commandprompt.com/issues/53272016-12-09T07:11:35ZJoshua Drake
<p>pgbouncer<br />pgpool</p> postgresql-snap - Task #5321 (New): Make postgres a systemd daemonhttps://public.commandprompt.com/issues/53212016-10-28T06:34:00ZIvan Lezhnjov
<p>Running postgres process as a daemon via an automatically generated systemd service file, results in snap utility failing to install a snap package.</p>
<p>The reason for this is because the said snap utility attempts to start all daemons when it is installing a snap package. The package is always installed as root and thus any daemon is run as root too. However, PostgreSQL is not designed to run as root and it actually refuses to. Thus, if a daemon startup fails, installation of a snap package fails too.</p>
<p>Ideally, postgres should be a systemd-managed process but given the clash of design philosophies it currently doesn't work well.</p>
<p>We need to start a dialog with snapcraft developers and see if they can propose a solution to this problem that doesn't involve patching PostgreSQL.</p> pitrtools - Feature #5315 (New): cmd_standby: Data Directory vs. Configuration Directory?https://public.commandprompt.com/issues/53152015-05-14T15:57:15ZMichael Vitalemichael@commandprompt.com
<p>Normally on most distros except Ubuntu, you can run pg_ctl command to start, stop, init the cluster, etc. On Ubuntu, (it is much more elaborate, to my liking I must say), where pg_ctl is enclosed within the wrapper, pg_ctlcluster. Not only that, but there is a separation between the data directory and the configuration directory:<br />configuration directory: /etc/postgresql/<version>/main<br />data directory : /var/lib/postgresql/<version>/main</p>
<p>Now to the point and how it relates to PITR TOOLS. By default, PITR TOOLs uses pg_ctl. It offers the option to either copy your configuration files specified in cmd_standby.conf to the data directory, or just start pg_ctl with the confs specified on the command line:</p>
<p>no_copy_conf: true --> command line specification of confs<br />no_copy_conf: false--> confs are copied to data directory</p>
<p>It would be nice if we had another parameter defined right under pgdata in cmd_standby.ini:<br />pgdata: /var/lib/postgresql/9.3/main</p>
<p>-- new proposed attribute<br />pgconf: /etc/postgresql/9.3/main</p>
<p>one implementation solution of many:<br />The cmd_standby executable could be modified slightly so that whenever pg_ctl is invoked and if no_copy_conf is false, and pgconf is not empty, then copy the specified conf files to the pgconf directory instead of the default action: copying them to the data directory. Furthermore, when pg_ctl is invoked in these cases pass to it as the -D parameter, the conf directory, not the data directory.</p> pitrtools - Feature #5306 (Feedback): Reimplementation of queuehttps://public.commandprompt.com/issues/53062014-05-13T12:58:27ZJoshua A. Drakezam@commandprompt.com
<p>Reimplementation of PITRTools queue<br />The current queue system possesses the following limitations:<br />1. No job control - If we are generating xlogs faster than we can ship them, rsync processes will be spawned uncontrollably.<br />2. A continuous stream of transaction logs must be generated for correct operation of the archiver. If there are no new logs <br />coming in, logs still in the queues will not get shipped.</p>
<p>Suggested solution:<br /><pre>
Queue management daemon - Have cmd_archiver only queue logs, with a separate daemon shipping them.
* cmd_queue daemon
- write PID to a file
- In worker thread
] Ship logs in queue with subprocess calls when self to-do list is not empty
} If successful, remove paths from self to-do list and log appropriate output
} Else, log which queues failed
] Wait a few seconds [configurable]
] Repeat
- In main thread
] Wait for data [absolute paths to queued logs] on a pipe or UNIX socket
] On data, parse and extract paths, append paths to self to-do list
] Repeat
* When cmd_archiver is called with a new archive, copy the archive to slave queues and write paths to cmd_queue via pipe/socket
</pre></p> pitrtools - Feature #5265 (New): Avoid the need to manually edit postgresql.conf fileshttps://public.commandprompt.com/issues/52652012-09-17T04:13:45ZAlexey Klyukinalexk@commandprompt.com
<p>Right now, we have a bizarre combination of running cmd_archiver from the command line and plugging it in postgresql.conf manually. Given that we already know the location of postgresql.conf, we can edit it to set all necessary options (wal_level, max_wal_senders, archive_mode, archive_command) automatically, leaving only database restart as a task that should be performed manually.</p> pitrtools - Discussion #5263 (New): PITRTools ini configuration files are too complexhttps://public.commandprompt.com/issues/52632012-09-17T04:03:52ZAlexey Klyukinalexk@commandprompt.com
<p>Since we position PITRTools as a tool to simplify WAL-shipping and replication setup, I though I'd count the number of options once needs to set in PIRTools, against pristine PostgresSQL:</p>
<p>PITRTools:<br />Archiver: 15<br />Standby: 31.</p>
<p>Comparing to the pristine PostgreSQL:<br />primary: (wal_level, archive_mode, archive_command, max_wal_senders) - 4.</p>
<p>standby (most of them belong to recovery.conf): (hot_standby, standby_mode, primary_conninfo, restore_command, archive_cleanup_command): 5</p>
<p>We need to rethink PITRTools configuration options. I've made the first step by splitting them into required and uncommon, and put reasonable defaults for the second ones (i.e. assumed ssh and rsync path is fixed, and there is no need to tweak rsync options or set ssh_debug), but to make the tool easier than pristine PostgreSQL we need to put some code to autodetect some of the parameters (i.e. autodetect things like PostgreSQL version, checkpoint_segments value for 8.2 and below, rsync_version, etc.)</p> PL/php - Bug #5260 (New): The function could not return varchar string -- When there is function ...https://public.commandprompt.com/issues/52602011-11-02T23:16:35Zanthony chenzhihong.chen.cn@gmail.com
<p>There is pl/php definition as attached plsimple.sql. Which include other files blank.php.</p>
<p>Run first time:<br />test=# select plsimple();<br /> plsimple<br />----------</p>
<p>(1 row)</p>
<p>test=#<br />Run second time:<br />test=# select plsimple();<br /> plsimple<br />--------------<br /> Hello world!<br />(1 row)</p>
<p>When remove the definition of function test() in the blank.php, the issue disppears.</p> PL/php - Feature #5259 (New): Add support for anonymous DO blocks.https://public.commandprompt.com/issues/52592011-05-27T05:52:31ZAlexey Klyukinalexk@commandprompt.com
<p>PostgreSQL 9.0 introduced a notion of inline DO blocks:<br /><a class="external" href="http://www.postgresql.org/docs/9.0/interactive/sql-do.html">http://www.postgresql.org/docs/9.0/interactive/sql-do.html</a></p>
<p>So far, nothing stops us from adding support for such blocks written in PL/PHP.</p> PL/php - Bug #5258 (New): Get rid of the trusted PL/PHPhttps://public.commandprompt.com/issues/52582011-05-27T05:43:07ZAlexey Klyukinalexk@commandprompt.com
<p>Apparently, the trusted PL/PHP has lots of security problems due to its trusted status, from sharing the same interpreter with an untrusted one, to <br />the fact that the trusted implementation relies on PHP safe mode, which is deprecated and allows some 'untrusted' (in PG's sense) operations, i.e. filesystem/network access. ATM we need to get rid of PL/PHP and leave only PL/PHPU implementation.</p> postgres.js - Support #5257 (New): method to catch error on connection?https://public.commandprompt.com/issues/52572011-05-26T09:15:50ZRick Hardingrharding@mitechie.com
<p>I'm trying to figure out how to properly catch an exception such as when the db server is unavailable. I've tried binding to a connection.on('error') event, but it doesn't look like it emits one. I see 'error' emitted when a query fails, but nothing on the actual connection attempt. Am I missing the proper way to handle that?</p>
<p>Thanks</p> PL/php - Discussion #5256 (New): Creating a PL/php distributionhttps://public.commandprompt.com/issues/52562011-05-21T18:36:16ZJoshua Drake
<p>Since we need PHP source to create plphp (due to no one shipping as embed), perhaps we should just include the source as part of the download of php and have a predefined configure that deals with all of it for people. Thoughts?</p> PL/php - Bug #5255 (New): support TRUNCATE triggershttps://public.commandprompt.com/issues/52552011-05-21T16:29:20ZÁlvaro Herreraalvherre@commandprompt.com
<p>$SUBJECT</p> PL/php - Feature #5236 (New): pg_raise to PHP Objecthttps://public.commandprompt.com/issues/52362010-07-29T11:07:09ZMoisés P. Senamoisespsena@gmail.com
<p>pg_raise to PHP Object</p>
<pre>
PGRaise::note('Note');
PGRaise::error('Error MSG');
// or
throw new PGException('error');
try {
PGRaise::error('MSG');
// or
throw new PGRaiseError('error');
}
catch(PGRaiseError $e)
{
PGRaise::note('ERROR IS Code: ' . $e->getCode() . ' - MSG: ' . $e->getMessage());
}
</pre> PL/php - Feature #5235 (New): SPI Object and not functionhttps://public.commandprompt.com/issues/52352010-07-29T10:48:04ZMoisés P. Senamoisespsena@gmail.com
<p>Today it uses the functions "SPI_ *" to perform query on database. It would be interesting if there was an object with methods to this question, style "PDO".</p>
<p>For example:</p>
<pre>
// of "SELECT PG_get_exp('x','y','z')" to
$fnResult = PG::fn->pg_get_exp('x','y','z')
$status = PG::status()
$chages = PG::exec()
$res = PG::query()
$res->count()
$res->next()
$res->rewind()
$item = $res->fetchRow()
$item = $res->fetchObject()
$item = $res->fetchArray()
or
while(($item = $res->fetchObject('ns\Class'))!=null)
</pre> PL/php - Bug #5225 (New): Unable to build PL/php on OS X (PHP 5.3)https://public.commandprompt.com/issues/52252010-06-29T05:25:59ZAlexey Klyukinalexk@commandprompt.com
<p>On OS X embed is built as a bundle instead of a library, making it impossible to link against it.</p>
<p>I've submitted the problem to the PHP project:<br /><a class="external" href="http://bugs.php.net/bug.php?id=48318">http://bugs.php.net/bug.php?id=48318</a></p>
<p>Still, it's not possible to build PL/php at the moment on this platform.</p>