Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1egrox-0002MT-2D for pgsql-general@arkaria.postgresql.org; Wed, 31 Jan 2018 12:48:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egrow-0004Iq-76 for pgsql-general@arkaria.postgresql.org; Wed, 31 Jan 2018 12:48:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1egrlD-00050L-Ny for pgsql-general@lists.postgresql.org; Wed, 31 Jan 2018 12:45:07 +0000 Received: from troz.pl ([37.187.125.115]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1egrlA-0001lP-Sw for pgsql-general@lists.postgresql.org; Wed, 31 Jan 2018 12:45:06 +0000 Received: from [192.168.1.140] (3224033-cl69.boa.fiberby.dk [89.23.224.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by troz.pl (Postfix) with ESMTPSA id B947D1DD for ; Wed, 31 Jan 2018 13:45:02 +0100 (CET) From: Konrad Witaszczyk Subject: Recreating functions after starting the database server. To: pgsql-general@lists.postgresql.org Message-ID: <62735ca9-2245-8a56-acd5-20f7871244d8@FreeBSD.org> Date: Wed, 31 Jan 2018 13:45:01 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iFLbxwXA5X43Ydct37hVZ6yDj8zpJ1UCC" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iFLbxwXA5X43Ydct37hVZ6yDj8zpJ1UCC Content-Type: multipart/mixed; boundary="SQQKw0C6XUaBBY5sOrkoI2w2cyWcR1D8y"; protected-headers="v1" From: Konrad Witaszczyk To: pgsql-general@lists.postgresql.org Message-ID: <62735ca9-2245-8a56-acd5-20f7871244d8@FreeBSD.org> Subject: Recreating functions after starting the database server. --SQQKw0C6XUaBBY5sOrkoI2w2cyWcR1D8y Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hi, I'm considering changing my database schema upgrade routines to recreate functions and all objects depending on them (e.g. triggers, views) just a= fter the database server is started. It would make the routines much simpler s= ince they wouldn't have to depend on the history of the schema. Does anyone has any experience with recreating all functions and triggers= to upgrade a database schema assuming that during the upgrade there are no c= lient connections to the database? Does anyone see any problems with such approach in terms of consistency a= nd performance? I'm not familiar with PostgreSQL internals and I'm not sure = how it would affect the planner when using various function volatile categories.= Konrad --SQQKw0C6XUaBBY5sOrkoI2w2cyWcR1D8y-- --iFLbxwXA5X43Ydct37hVZ6yDj8zpJ1UCC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE/bUwFm9Qs8vtm2934cEiWwsmpPAFAlpxuk5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZE QjUzMDE2NkY1MEIzQ0JFRDlCNkY3N0UxQzEyMjVCMEIyNkE0RjAACgkQ4cEiWwsm pPDwSQ/+OdMr2xzu7niN452cF1g27nEjWrxYRJCECxvpyRg6lxy7J//DJ2S3LfrP 2EQQXT7e7TtYpIlIsfzSZSgumd77Hleo7Yj/7IN+fQI83iNFP50yAcMwYYuA8RV9 PU0ZYxb6/0ZtFKX4OX+1zN+V4VdmW2oyd07yEzvNJh0YNl28/YW15LBYDXzU02db PUK2tZdEuqxt4bGGOuxYXGlK1pOga/B/YMTBLIzsgdgnaMcHWez32mIhD2dVLjlJ j71XT5IwNVHGmzQcyez3ZHOvJiXJb9FH5gPEgTclVDN4KMePUqLQJC1nIKbeCL+d vkNEsD7E+kJ2Nfmk6EVZxrNGHbJP45Fo7t/C5Ux6Qwyca96pydaZUbRe2J05c1UZ erbxJ3I1U5waaLncBk/hjJFQCp6LLXrJTkixqHua3h7E8WYneJmyQH+H6hfSx8qa W3IKgEv8y6+cz/VrVj9CydqSwE9p/DkXulVNj9dEJb4j36ZiOCWkrrnxABDdcY2j pXGRotEadQhDmrHidvnXlf8Ojkr5mTu9Fq1SNXtesSgEpPoQnwltEgkWVK2DFuSv 4H9PRqtOhxXmj10IT+dNcl0dIoyWlQ8xqwkI1UGP1+51C1f6y3/FJE8dNcREu+09 eGOkymnnVrG2YlRyJhJ5FjD8r0QUbhNGy9qroz5ZHO9LH3HWDWI= =y5nJ -----END PGP SIGNATURE----- --iFLbxwXA5X43Ydct37hVZ6yDj8zpJ1UCC--